haven't had any problems with the performance timer here, but then I don't have dual core.
anyway, here's my time code if that helps (with example)...
*EDIT* tried it with this code...
and got a different result on each line...
so seems to work ok here
anyway, here's my time code if that helps (with example)...
Strict Extern "win32" Function QueryPerformanceFrequency(LARGE_INTEGER:Long Var) Function QueryPerformanceCounter(LARGE_INTEGER:Long Var) EndExtern ' ---------------------------------------------------------------------------------------------- Local Timer:TPerformanceTime = New TPerformanceTime Timer.Start() Delay 1000 Print Timer.Stop() ' should print 1 (or so) Graphics 640,480,32,85 Repeat Cls DrawText(Timer.Time(),10,10) Flip Until KeyDown(KEY_ESCAPE) ' ---------------------------------------------------------------------------------------------- Type TPerformanceTime Global Frequency:Long Field StartTime:Long Field StopTime:Long Method New() If Not Frequency Then QueryPerformanceFrequency(Frequency) EndMethod ' returns the current system time Method Time:Double() Local Time:Long QueryPerformanceCounter(Time) Return Double(Time)/Frequency EndMethod ' start the stopwatch Method Start() QueryPerformanceCounter(StartTime) EndMethod ' will return the stopwatch result, can be called more than once! Method Stop:Double() QueryPerformanceCounter(StopTime) Return Double(StopTime-StartTime)/Frequency EndMethod EndType
*EDIT* tried it with this code...
Local Timer:TPerformanceTime = New TPerformanceTime For Local n=0 To 100 Print Timer.Time()+" - "+MilliSecs() Next
and got a different result on each line...
15468.774916085704 - 15468464 15468.774987882538 - 15468464 15468.775005761905 - 15468464 15468.775095158742 - 15468464 15468.775113038109 - 15468464 15468.775130638112 - 15468464 15468.775147120654 - 15468464 15468.775163323829 - 15468464 15468.775179527007 - 15468464 15468.775196009548 - 15468464 15468.775212492090 - 15468464 15468.775228415901 - 15468464 15468.775244898443 - 15468464 15468.775261101620 - 15468464 15468.775277584162 - 15468464 15468.775293787339 - 15468464 15468.775309990515 - 15468464 15468.775326473058 - 15468464 15468.775342955600 - 15468464 15468.775359158775 - 15468464 15468.775375361953 - 15468464 15468.775391844494 - 15468464 15468.775408327036 - 15468464 15468.775426485769 - 15468464 15468.775442968310 - 15468464 15468.775459171487 - 15468464 15468.775475374663 - 15468464 15468.775491577841 - 15468464 15468.775507501652 - 15468464 15468.775523704828 - 15468464 15468.775539628639 - 15468464 15468.775555831817 - 15468464 15468.775572314358 - 15468464 15468.775588238170 - 15468464 15468.775604161981 - 15468464 15468.775620365159 - 15468464 15468.775636568334 - 15468464 15468.775652212782 - 15468464 15468.775668695323 - 15468464 15468.775800835023 - 15468465 15468.775819831850 - 15468465 15468.775836593757 - 15468465 15468.775853076299 - 15468465 15468.775869558840 - 15468465 15468.775888555669 - 15468465 15468.775905038210 - 15468465 15468.775921520752 - 15468465 15468.775938282659 - 15468465 15468.775954485836 - 15468465 15468.775970968378 - 15468465 15468.775987450919 - 15468465 15468.776003654095 - 15468465 15468.776019577906 - 15468465 15468.776036060450 - 15468465 15468.776052263625 - 15468465 15468.776068466803 - 15468465 15468.776084669978 - 15468465 15468.776100873156 - 15468465 15468.776117076332 - 15468465 15468.776134117605 - 15468465 15468.776150320780 - 15468465 15468.776166523958 - 15468465 15468.776182727135 - 15468465 15468.776199209677 - 15468465 15468.776215412852 - 15468465 15468.776233571585 - 15468465 15468.776249774763 - 15468465 15468.776265698574 - 15468465 15468.776281901750 - 15468465 15468.776298104927 - 15468465 15468.776314308103 - 15468465 15468.776330231914 - 15468465 15468.776346714456 - 15468465 15468.776363196999 - 15468465 15468.776379400175 - 15468465 15468.776395603352 - 15468465 15468.776412085894 - 15468465 15468.776428289069 - 15468465 15468.776444771613 - 15468465 15468.776460974788 - 15468465 15468.776477736696 - 15468465 15468.776493939873 - 15468465 15468.776510701779 - 15468465 15468.776527184322 - 15468465 15468.776543387497 - 15468465 15468.776559870039 - 15468465 15468.776575793850 - 15468465 15468.776594790679 - 15468465 15468.776610714491 - 15468465 15468.776627197032 - 15468465 15468.776643679574 - 15468465 15468.776665190688 - 15468466 15468.776681952595 - 15468466 15468.776698155771 - 15468466 15468.776714358948 - 15468466 15468.776730841490 - 15468466 15468.776747044667 - 15468466 15468.776763247843 - 15468466 15468.776779730384 - 15468466 15468.776795933562 - 15468466 15468.776812136739 - 15468466
so seems to work ok here