Commit 61d38fbe authored by Martin Sustrik's avatar Martin Sustrik

Bug in low precision clock fixed.

Signed-off-by: 's avatarMartin Sustrik <sustrik@250bpm.com>
parent 0a03e86e
......@@ -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;
}
......
......@@ -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&);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment