Browse Source

fix: TStopwatch.GetTimeStamp return wrong value under Linux

Zhan Wang 1 month ago
parent
commit
a1ffb893a3
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/vcl-compat/src/system.diagnostics.pp

+ 1 - 1
packages/vcl-compat/src/system.diagnostics.pp

@@ -178,7 +178,7 @@ var
 
 begin
   clock_gettime(CLOCK_MONOTONIC, @res);
-  Result:=((StopWatchResolution*res.tv_sec)+res.tv_nsec) div 100;
+  Result:=((Int64(1000000000)*res.tv_sec)+res.tv_nsec) div 100;
 end;