summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/clock.cpp4
-rw-r--r--src/clock.hpp3
2 files changed, 5 insertions, 2 deletions
diff --git a/src/clock.cpp b/src/clock.cpp
index 2fa23d0..432b48e 100644
--- a/src/clock.cpp
+++ b/src/clock.cpp
@@ -31,7 +31,7 @@
zmq::clock_t::clock_t () :
last_tsc (rdtsc ()),
- last_time (now_us ())
+ last_time (now_us () / 1000)
{
}
@@ -82,7 +82,7 @@ uint64_t zmq::clock_t::now_ms ()
return last_time;
last_tsc = tsc;
- last_time = now_us ();
+ last_time = now_us () / 1000;
return last_time;
}
diff --git a/src/clock.hpp b/src/clock.hpp
index 8b3bc75..6dc811f 100644
--- a/src/clock.hpp
+++ b/src/clock.hpp
@@ -44,7 +44,10 @@ namespace zmq
private:
+ // TSC timestamp of when last time measurement was made.
uint64_t last_tsc;
+
+ // Physical time corresponding to the TSC above (in milliseconds).
uint64_t last_time;
clock_t (const clock_t&);