On Thu, Sep 13, 2012 at 05:22:27PM +0200, Adrian Knoth wrote: | On 09/13/2012 02:09 PM, Luis Claudio R. Goncalves wrote: | | > | clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, &ts, NULL); | > | within the application's main loop. | > | The value of "ts" will be incremented after every call. | > | | > CLOCK_MONOTONIC is not affected by NTP nor any adjusts to date and time | > that the admin/user may perform. | | I beg to differ. CLOCK_MONOTONIC is frequency adjusted. Though it won't | jump, it will slew. From man clock_gettime: | | CLOCK_MONOTONIC | Clock that cannot be set and represents monotonic time since | some unspecified starting point. This clock is not affected by | discontinuous jumps in the system time (e.g., if the system | administrator manually changes the clock), but is affected by | the incremental adjustments performed by adjtime(3) and NTP. You are right. The man pages I had access to are a bit less verbose on the description but, to the attentive reader, give the same idea. Also Mathieu and Rostedt showed me I had a slightly absurd concept of 'monotonic'. I learned two new things on a single discussion :) Cheers, Luis -- [ Luis Claudio R. Goncalves Bass - Gospel - RT ] [ Fingerprint: 4FDD B8C4 3C59 34BD 8BE9 2696 7203 D980 A448 C8F8 ] -- To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html