index e335e3fc8ee1c0abd2fd4cb361e6082f7cd61a4e..6fb00357b467071a192a46556511fd86b0021780 100644 (file)
--- a/src/shared/xprofiler.pas
+++ b/src/shared/xprofiler.pas
end;
+function curTimeMicro (): UInt64; inline;
+function curTimeMilli (): UInt64; inline;
+
+
implementation
{$IF DEFINED(LINUX)}
var
r: THPTimeType;
begin
- if (mFrequency = 0) then initTimerIntr();
+ //if (mFrequency = 0) then initTimerIntr();
{$IF DEFINED(LINUX)}
clock_gettime(CLOCK_MONOTONIC, @r);
result := UInt64(r.tv_sec)*1000000+UInt64(r.tv_nsec) div 1000; // microseconds
end;
+function curTimeMilli (): UInt64; inline;
+begin
+ result := curTimeMicro div 1000;
+end;
+
+
// ////////////////////////////////////////////////////////////////////////// //
class function TStopWatch.Create (): TStopWatch;
begin
end;
+begin
+ initTimerIntr();
end.