summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9a8ac23)
raw | patch | inline | side by side (parent: 9a8ac23)
author | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Mon, 21 Aug 2017 18:41:51 +0000 (21:41 +0300) | ||
committer | Ketmar Dark <ketmar@ketmar.no-ip.org> | |
Mon, 21 Aug 2017 19:29:32 +0000 (22:29 +0300) |
src/shared/xprofiler.pas | patch | blob | history |
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.