Time going backwards with clock_gettime(CLOCK_MONOTONIC, ...)

Nick Withers nick.withers at anu.edu.au
Tue Nov 11 02:40:55 UTC 2014


Hullo all!

I've seen successive calls to clock_gettime(CLOCK_MONOTONIC, ...) return
earlier times (RTEMS 4.11 on the MVME3100 PowerPC BSP) and have whacked
a test case together (see attached) which just busy loops calling it.

Example failures:
____

Starting...
Time went backwards, from {0, 59999000} to {0, 50000000}
Time went backwards, from {0, 559999000} to {0, 550000000}
Time went backwards, from {0, 849999000} to {0, 840000000}
Time went backwards, from {1, 9999000} to {1, 0}
Time went backwards, from {1, 39999000} to {1, 30000000}
Time went backwards, from {1, 249999000} to {1, 240000000}
Time went backwards, from {1, 299999000} to {1, 290000000}
Time went backwards, from {1, 319999000} to {1, 310000000}
Time went backwards, from {1, 359999000} to {1, 350000000}
Time went backwards, from {1, 829999000} to {1, 820000000}
____

Could this be related to bug 1748 (can't see it right now with rtems.org
down)? Any other ideas where I should look to fix this, or whether it's
a known thing?

Ta all!
-- 
Nick Withers

Embedded Systems Programmer
Department of Nuclear Physics, Research School of Physics and Engineering
The Australian National University (CRICOS: 00120C)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rtems-time-backwards.tar.gz
Type: application/x-compressed-tar
Size: 2548 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/users/attachments/20141111/88823e90/attachment.bin>


More information about the users mailing list