|
Boost : |
From: christopher diggins (cdiggins_at_[hidden])
Date: 2005-02-08 11:12:53
Does anyone have any idea about how the methods for computing time compare
on a unix/linux system? Specifically I am interested in resolution and
reliability.
using namespace boost;
using namespace date_time;
{
timer t;
// code ...
double sec = t.elapsed();
}
{
ptime start = microsec_clock::local_time();
// code ...
time_duration total = microsec_clock::local_time() - start;
double sec = total.seconds() + (1000000000 / total.fractional_seconds());
}
Thanks
Christopher Diggins
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk