On Fri, Feb 07, 2003 at 04:56:10PM +0100, Preben Mikael Bohn wrote: > Hi all, I have a relatively large FPC program that I suspect have a few > bottlenecks (regarding processing speed). Are there any ways I can test how > long time the program spends in the different procedures/functions?
Use this bit of code in your functions/procedures or write it as a function and call it. > > Best regards Preben > > > _______________________________________________ > fpc-pascal maillist - [EMAIL PROTECTED] > http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Program Example5; { Program to demonstrate the GetTime function. } Uses linux, CRT, sysUtils; Var Hour, Minute, Second, msec, usec : Word; begin clrScr; repeat gotoXY(1, 1); getTime (Hour, Minute, Second, msec, usec); writeLn('Time: ' + intToStr(Hour) + ':' + intToStr(Minute) + ':' + intToStr(Second) + '.' + intToStr(msec) + '.' + intToStr(usec)); until keyPressed; end.