Getting current milliseconds. lazarus / 8-Other ---------------------------------------------------------------------- daz · 2009-04-22 03:50 I'm trying to count the milliseconds it takes for my program to loop through something but I cannot figure it out exactly.. Code: [Select]procedure TForm1.btnEstClick(Sender: TObject); var    curmilli,latermilli:comp; begin   curmilli:=timestamptomsecs(datetimetotimestamp(now));   showmessage('Waiting');   latermilli:=timestamptomsecs(datetimetotimestamp(now));   showmessage(latermilli-curmilli); end; I don't even know what the "comp" type is, but that's what timestamptomsecs returns (and I believe that's milliseconds), so I can't subtract the milliseconds or show them as a message :/. Is there an easier way? Or how do I go about converting those comp types to a type of integer...? ---------------------------------------------------------------------- chrnobel · 2009-04-22 06:41 Hi. Use the EpikTimer: http://wiki.lazarus.freepascal.org/EpikTimer /Christian ---------------------------------------------------------------------- theo · 2009-04-22 08:25 uses LCLIntf GetTickCount;