RosettaCodeData/Task/Time-a-function/PureBasic/time-a-function-2.purebasic
Ingy döt Net 68f8f3e56b all tasks
2013-04-11 01:07:29 -07:00

14 lines
465 B
Text

If OpenConsole()
Define Timed.f, cnt
PrintN("Starting timing of a calculation,")
PrintN("for this we test how many of 0-1000000 are palindromic.")
; Dependent on Droopy-library
If MeasureHiResIntervalStart()
; Same Foo() as above...
cnt=Foo(1000000)
Timed=MeasureHiResIntervalStop()
EndIf
PrintN("The function need "+StrF(Timed*1000,3)+" msec,")
PrintN("and "+Str(cnt)+" are palindromic.")
Print("Press ENTER to exit."): Input()
EndIf