mirror of
https://github.com/boostorg/convert.git
synced 2026-02-01 08:22:18 +00:00
sorting out headers and dependencies
This commit is contained in:
15
test/timer.cpp
Normal file
15
test/timer.cpp
Normal file
@@ -0,0 +1,15 @@
|
||||
#include "./test.hpp"
|
||||
#include "./timer.hpp"
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
|
||||
double
|
||||
test::cnv::timer::value() const
|
||||
{
|
||||
struct tms tms_end;
|
||||
double const end = times(&tms_end);
|
||||
int const use_sum = (sum_ % 2) ? 0 : (sum_ % 2); BOOST_TEST(use_sum == 0);
|
||||
double use_beg = tms_beg_.tms_utime + tms_beg_.tms_stime;
|
||||
double use_end = tms_end .tms_utime + tms_end .tms_stime;
|
||||
|
||||
return (use_end - use_beg) / sysconf(_SC_CLK_TCK) + use_sum;
|
||||
}
|
||||
Reference in New Issue
Block a user