[LAD] Strange gettimeofday behaviour - out of order times.

From: Tim E. Real <termtech@email-addr-hidden>
Date: Thu May 05 2011 - 02:11:59 EEST

I discovered gettimeofday occasionally gives me a time value
 which is less than a previous time value. The value is actually
 'out of order' and really belongs ahead of a few others,
 according to examined printouts.

So I tried clock_gettime(CLOCK_MONOTONIC, ..), same result.

Then I tried clock_gettime(CLOCK_PROCESS_CPUTIME_ID, ..)
 and it appears to be OK so far, giving me what I want - truly linear time.

Still checking some things, maybe there's a reason, the app's fault.
From what I've read gettimeofday is thread safe, but the incorrect
 time values are being read by the same thread always.

Any advice here, anyone seen this?

Also, when using Jack, is it advisable to choose the same
 clock method as Jack is using (cycle, hpet, system)?

Thanks. Tim.
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Wed, 4 May 2011 19:11:59 -0400

This archive was generated by hypermail 2.1.8 : Thu May 05 2011 - 04:15:01 EEST