Subject: [boost] [Date_Time] acquiring accurate high resolution system time
From: Jean-Gerard Beauport (j.beauport_at_[hidden])
Date: 2009-12-10 23:15:18
For middleware purposes we have been looking at using Boost as our
library. It seems to cover most of our requirements.
Now it has been brought to our attention that one of our requirements
to be able to get the system time at a high resolution. Although using
the high performance counter is a solution to this, it has its flaws. We
read an article that gives a solution that overcomes some of the problems
inherent to using the performance counters, and combines/synchronizes these
counters with system time to achieve better resolution.
The following is a link to the article that tackles the subject (on
Has solving this type of issue been considered in Date_Time? Is it worth
into? With these questions, I am trying to avoid venturing in something
have already been experimented with and concluded on.
I have noticed in the boost::date_time code that there is the
microsec_clock::local_time() call that should provide high resolution time,
but in looking at the code I do not quite understand how that is
I am trying to understand the file_time_to_microseconds() function in
filetime_functions.hpp, and I have difficulty to understand how counting
microseconds difference from Jan-01-1601 to Jan-01-1970 comes into play in
counting the microseconds from epoch to "now". Can someone clarify this?
I thank you in advance for taking the time to answer my few questions.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk