Ignore:
Timestamp:
Nov 30, 2023, 10:16:14 PM (6 months ago)
Author:
chronos
Message:
  • Modified: Updated high dpi branch from trunk.
  • Modified: Use generics.collections instead of fgl.
  • Modified: Compile with Delphi syntax.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/highdpi/Platform.pas

    r303 r465  
    11unit Platform;
    2 
    3 {$mode delphi}{$H+}
    42
    53interface
    64
    75uses
    8   {$IFDEF Windows}Windows,{$ENDIF}
    9   {$IFDEF Linux}Unix,{$ENDIF}
     6  {$IFDEF WINDOWS}Windows,{$ENDIF}
     7  {$IFDEF UNIX}Unix,{$ENDIF}
    108  Classes, SysUtils, DateUtils, SyncObjs;
    119
    1210function NowPrecise: TDateTime;
    1311
     12
    1413implementation
    1514
    16 {$IFDEF Windows}
     15{$IFDEF WINDOWS}
    1716var
    1817  PerformanceFrequency: Int64;
     
    2423function NowPrecise: TDateTime;
    2524var
    26   {$IFDEF Linux}T: TimeVal;{$ENDIF}
    27   {$IFDEF Windows}TimerValue: Int64;{$ENDIF}
     25  {$IFDEF UNIX}T: TimeVal;{$ENDIF}
     26  {$IFDEF WINDOWS}TimerValue: Int64;{$ENDIF}
    2827begin
    2928//  Result := Now;
    3029  //try
    3130    //NowPreciseLock.Acquire;
    32     {$IFDEF Windows}
     31    {$IFDEF WINDOWS}
    3332    QueryPerformanceCounter(TimerValue);
    3433    //Result := Int64(TimeStampToMSecs(DateTimeToTimeStamp(Now)) * 1000) // an alternative Win32 timebase
     
    3635    {$ENDIF}
    3736
    38     {$IFDEF Linux}
     37    {$IFDEF UNIX}
    3938    fpgettimeofday(@t, nil);
    4039     // Build a 64 bit microsecond tick from the seconds and microsecond longints
     
    5150initialization
    5251
    53 {$IFDEF Windows}
     52{$IFDEF WINDOWS}
    5453QueryPerformanceFrequency(PerformanceFrequency);
    5554{$ENDIF}
     
    6261end.
    6362
     63
Note: See TracChangeset for help on using the changeset viewer.