aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/time.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Replace time_t_to_tm with calendar_value which returns a struct representinglloyd2009-12-241-5/+10
| | | | the calendar time without tying to a particular format. From the C++0x branch.
* Wrap up whatever we're using for gmtime in an anon-namespace function do_gmtimelloyd2009-12-241-14/+19
|
* Fix compile of get_nanoseconds_clock for Windows.lloyd2009-12-231-2/+12
| | | | | | | Add macros for OS support of gmtime_r (Unix) and gmtime_s (Win32) to deal with thread-unsafety of std::gmtime. Only enable gmtime_r on Linux currently, but it's probably available pretty much everywhere (specified in pthreads, origininally, AFAICT).
* Add GetSystemTimeAsFileTime as high res timer for Win32lloyd2009-12-221-7/+21
|
* Consolidate the non-canonical epoch timers, like cpuid and Win32'slloyd2009-12-011-0/+87
QueryPerformanceCounter, into an entropy source hres_timer. Its results, if any, do not count as contributing entropy to the poll. Convert the other (monotonic/fixed epoch) timers to a single function get_nanoseconds_clock(), living in time.h, which statically chooses the 'best' timer type (clock_gettime, gettimeofday, std::clock, in that order depending on what is available). Add feature test macros for clock_gettime and gettimeofday. Remove the Timer class and timer.h. Remove the Timer& argument to the algorithm benchmark function.