Changeset 252 for Common/StopWatch.pas


Ignore:
Timestamp:
Jun 16, 2011, 11:39:42 AM (13 years ago)
Author:
george
Message:
  • Fixed: Compilation on Linux.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Common/StopWatch.pas

    r118 r252  
    44interface
    55
    6 uses Windows, SysUtils, DateUtils;
     6uses
     7  {$IFDEF Windows}Windows,{$ENDIF}
     8  SysUtils, DateUtils;
    79
    8 type
     10type
     11  TLargeInteger = Int64;
     12
    913  TStopWatch = class
    1014  private
     
    3640  fIsRunning := False;
    3741
     42  {$IFDEF Windows}
    3843  fIsHighResolution := QueryPerformanceFrequency(fFrequency) ;
     44  {$ELSE}
     45  raise Exception.Create('Not implemeneted');
     46  {$ENDIF}
    3947  if NOT fIsHighResolution then fFrequency := MSecsPerSec;
    4048
     
    5058begin
    5159  if fIsHighResolution then
     60    {$IFDEF Windows}
    5261    QueryPerformanceCounter(lInt)
     62    {$ELSE}
     63    raise Exception.Create('Not implemeneted')
     64    {$ENDIF}
    5365  else
    5466    lInt := MilliSecondOf(Now) ;
Note: See TracChangeset for help on using the changeset viewer.