{$ifdef windows}
  var
    _startnow: TDateTime;
    _starttick: longint;
  {function Now(): TDateTime; //more precise version, with real resolution 1 ms
  begin
    Result:= _startnow + (GetTickCount() - _starttick) / 86400000.0;
  end;
  }
{$endif}

  procedure InitTimer;
  begin
   {$ifdef windows}
    _startnow:= SysUtils.Now();
    _starttick:= GetTickCount();
   {$endif}
  end;

