|
Boost : |
Subject: [boost] [chrono] isuue with accuracy test on some platforms
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2011-01-06 18:14:23
Hi,
I'm observing some errors in Boost.Chrono related to this accuracy test whcih fails if the elapsed time is over 200ms
(see http://svn.boost.org/svn/boost/trunk/libs/chrono/example/chrono_accuracy_test.cpp ). The results are showed below.
I'm tempted to remove the check on the unit tests as there is nothing working wrong with the library but with the platform.
This user can run this test and see the output to have an idea of the accuracy of the std::clock function on her platform.
Comments?
Best,
Vicente
________________________________________
accuracy test for 1 second(s)...
1000000000 timeout_in_nanoseconds
200000000 maximum_delta
1811871936 sys_dur
../libs/chrono/test/../example/chrono_accuracy_test.cpp(74): test 'sys_dur > timeout_in_nanoseconds - maximum_delta && sys_dur < timeout_in_nanoseconds + maximum_delta' failed in function 'void<unnamed>::accuracy_test(int, char**)'
1811868977 mono_dur
../libs/chrono/test/../example/chrono_accuracy_test.cpp(80): test 'mono_dur > timeout_in_nanoseconds - maximum_delta && mono_dur < timeout_in_nanoseconds + maximum_delta' failed in function 'void<unnamed>::accuracy_test(int, char**)'
1811868554 hires_dur
../libs/chrono/test/../example/chrono_accuracy_test.cpp(86): test 'hires_dur > timeout_in_nanoseconds - maximum_delta && hires_dur < timeout_in_nanoseconds + maximum_delta' failed in function 'void<unnamed>::accuracy_test(int, char**)'
3 errors detected.
Or
accuracy test for 1 second(s)...
1000000000 timeout_in_nanoseconds
200000000 maximum_delta
1536756457 sys_dur
../libs/chrono/test/../example/chrono_accuracy_test.cpp(74): test 'sys_dur > timeout_in_nanoseconds - maximum_delta && sys_dur < timeout_in_nanoseconds + maximum_delta' failed in function 'void<unnamed>::accuracy_test(int, char**)'
1536855050 mono_dur
../libs/chrono/test/../example/chrono_accuracy_test.cpp(80): test 'mono_dur > timeout_in_nanoseconds - maximum_delta && mono_dur < timeout_in_nanoseconds + maximum_delta' failed in function 'void<unnamed>::accuracy_test(int, char**)'
1536855104 hires_dur
../libs/chrono/test/../example/chrono_accuracy_test.cpp(86): test 'hires_dur > timeout_in_nanoseconds - maximum_delta && hires_dur < timeout_in_nanoseconds + maximum_delta' failed in function 'void<unnamed>::accuracy_test(int, char**)'
3 errors detected.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk