Boost Users :
Subject: [Boost-users] [Date_Time] reliability and high resolution when getting system time
From: John Beauport (j.beauport_at_[hidden])
Date: 2009-12-07 19:15:34
For middleware purposes we have been looking at using Boost as our date/time
library. It seems to cover most of our requirements.
Now it has been brought to our attention that one of our requirements would be
to be able to get the system time at a high resolution. Although using solely
the high performance counter is a solution to this, it has its flaws. We have
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 Windows):
Has solving this type of issue been considered in Date_Time? Is it worth looking
into? With these questions, I am trying to avoid venturing in something that may
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 achieved with
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-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net