Changeset 17 for trunk/GameServer.pas


Ignore:
Timestamp:
Jan 8, 2017, 11:21:02 AM (7 years ago)
Author:
chronos
Message:
  • Fixed: Build under Linux.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GameServer.pas

    r10 r17  
    77
    88uses
    9   Protocol, Database, dynlibs, Windows;
     9  Protocol, Database, dynlibs, Platform, dateutils;
    1010
    1111const
     
    127127  AIInfo: array [0 .. nPl - 1] of string;
    128128  Notify: TNotifyFunction;
    129   PerfFreq, LastClientTime: int64;
     129  LastClientTime: TDateTime;
    130130{$IFOPT O-}HandoverStack: array [0 .. 31] of Cardinal; {$ENDIF}
    131131  AutoSaveExists, LoadOK, WinOnAlone, PreviewElevation, MovieStopped: boolean;
     
    320320var
    321321  p: integer;
    322   T: int64;
     322  T: TDateTime;
    323323begin
    324   QueryPerformanceCounter(T);
     324  T := NowPrecise;
    325325  PutMessage(1 shl 16 + 2, Format('CLIENT: took %.1f ms',
    326     [{$IFDEF VER100}(T.LowPart - LastClientTime.LowPart)
    327 {$ELSE}(T - LastClientTime){$ENDIF} * 1000.0 / PerfFreq]));
     326    [MilliSecondOf(T - LastClientTime)]));
    328327  LastClientTime := T;
    329328  PutMessage(1 shl 16 + 2, Format('CLIENT: calling %d (%s)',
     
    44724471initialization
    44734472
    4474 QueryPerformanceFrequency(PerfFreq);
    44754473FindFirst(ParamStr(0), $21, ExeInfo);
    44764474
Note: See TracChangeset for help on using the changeset viewer.