Changeset 252 for Common/StopWatch.pas
- Timestamp:
- Jun 16, 2011, 11:39:42 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Common/StopWatch.pas
r118 r252 4 4 interface 5 5 6 uses Windows, SysUtils, DateUtils; 6 uses 7 {$IFDEF Windows}Windows,{$ENDIF} 8 SysUtils, DateUtils; 7 9 8 type 10 type 11 TLargeInteger = Int64; 12 9 13 TStopWatch = class 10 14 private … … 36 40 fIsRunning := False; 37 41 42 {$IFDEF Windows} 38 43 fIsHighResolution := QueryPerformanceFrequency(fFrequency) ; 44 {$ELSE} 45 raise Exception.Create('Not implemeneted'); 46 {$ENDIF} 39 47 if NOT fIsHighResolution then fFrequency := MSecsPerSec; 40 48 … … 50 58 begin 51 59 if fIsHighResolution then 60 {$IFDEF Windows} 52 61 QueryPerformanceCounter(lInt) 62 {$ELSE} 63 raise Exception.Create('Not implemeneted') 64 {$ENDIF} 53 65 else 54 66 lInt := MilliSecondOf(Now) ;
Note:
See TracChangeset
for help on using the changeset viewer.