summaryrefslogtreecommitdiff
path: root/zen/tick_count.h
diff options
context:
space:
mode:
Diffstat (limited to 'zen/tick_count.h')
-rw-r--r--zen/tick_count.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/zen/tick_count.h b/zen/tick_count.h
index 482689d7..56179b62 100644
--- a/zen/tick_count.h
+++ b/zen/tick_count.h
@@ -64,9 +64,9 @@ public:
#ifdef ZEN_WIN
return numeric::dist(lhs.val_.QuadPart, rhs.val_.QuadPart); //std::abs(a - b) can lead to overflow!
#elif defined ZEN_LINUX
-//structure timespec documented with members:
-// time_t tv_sec seconds
-// long tv_nsec nanoseconds
+ //structure timespec documented with members:
+ // time_t tv_sec seconds
+ // long tv_nsec nanoseconds
const int64_t deltaSec = lhs.val_.tv_sec - rhs.val_.tv_sec;
const int64_t deltaNsec = lhs.val_.tv_nsec - rhs.val_.tv_nsec;
return numeric::abs(deltaSec * 1000000000 + deltaNsec);
@@ -113,9 +113,9 @@ int64_t ticksPerSec() //return 0 on error
mach_timebase_info_data_t tbi = {};
if (::mach_timebase_info(&tbi) != KERN_SUCCESS)
return 0;
-//structure mach_timebase_info_data_t documented with members:
-// uint32_t numer;
-// uint32_t denom;
+ //structure mach_timebase_info_data_t documented with members:
+ // uint32_t numer;
+ // uint32_t denom;
return static_cast<int64_t>(1000000000) * tbi.denom / tbi.numer;
#endif
}
@@ -126,10 +126,10 @@ TickVal getTicks() //return !isValid() on error
{
#ifdef ZEN_WIN
LARGE_INTEGER now = {};
- if (!::QueryPerformanceCounter(&now))
+ if (!::QueryPerformanceCounter(&now))
return TickVal();
- //detailed info about QPC: http://msdn.microsoft.com/en-us/library/windows/desktop/dn553408%28v=vs.85%29.aspx
- //- MSDN: "No need to set the thread affinity"
+ //detailed info about QPC: http://msdn.microsoft.com/en-us/library/windows/desktop/dn553408%28v=vs.85%29.aspx
+ //- MSDN: "No need to set the thread affinity"
#elif defined ZEN_LINUX
//gettimeofday() seems fine but is deprecated
bgstack15