Changeset 465 for branches/highdpi/Platform.pas
- Timestamp:
- Nov 30, 2023, 10:16:14 PM (12 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/highdpi/Platform.pas
r303 r465 1 1 unit Platform; 2 3 {$mode delphi}{$H+}4 2 5 3 interface 6 4 7 5 uses 8 {$IFDEF W indows}Windows,{$ENDIF}9 {$IFDEF Linux}Unix,{$ENDIF}6 {$IFDEF WINDOWS}Windows,{$ENDIF} 7 {$IFDEF UNIX}Unix,{$ENDIF} 10 8 Classes, SysUtils, DateUtils, SyncObjs; 11 9 12 10 function NowPrecise: TDateTime; 13 11 12 14 13 implementation 15 14 16 {$IFDEF W indows}15 {$IFDEF WINDOWS} 17 16 var 18 17 PerformanceFrequency: Int64; … … 24 23 function NowPrecise: TDateTime; 25 24 var 26 {$IFDEF Linux}T: TimeVal;{$ENDIF}27 {$IFDEF W indows}TimerValue: Int64;{$ENDIF}25 {$IFDEF UNIX}T: TimeVal;{$ENDIF} 26 {$IFDEF WINDOWS}TimerValue: Int64;{$ENDIF} 28 27 begin 29 28 // Result := Now; 30 29 //try 31 30 //NowPreciseLock.Acquire; 32 {$IFDEF W indows}31 {$IFDEF WINDOWS} 33 32 QueryPerformanceCounter(TimerValue); 34 33 //Result := Int64(TimeStampToMSecs(DateTimeToTimeStamp(Now)) * 1000) // an alternative Win32 timebase … … 36 35 {$ENDIF} 37 36 38 {$IFDEF Linux}37 {$IFDEF UNIX} 39 38 fpgettimeofday(@t, nil); 40 39 // Build a 64 bit microsecond tick from the seconds and microsecond longints … … 51 50 initialization 52 51 53 {$IFDEF W indows}52 {$IFDEF WINDOWS} 54 53 QueryPerformanceFrequency(PerformanceFrequency); 55 54 {$ENDIF} … … 62 61 end. 63 62 63
Note:
See TracChangeset
for help on using the changeset viewer.