Message98482
> pthreads will default to use the real time clock. In order
> to have them use the monotonic timer, you have to setup
> a condition variable attribute: See the man-page for
> pthread_condattr_setclock().
I'll look at that, but I'm not thrilled at the propect of complicating
the code paths so much. There may be systems where CLOCK_MONOTONIC is
unavailable, others where pthread_condattr_setclock() is unsupported,
etc.
> The code won't get more complicated if you refactor the time
> querying logic into a separate function (which the compiler can then
> inline as necessary).
It does get more complicated, since there are several paths
(clock_gettime() and then a fallback on gettimeofday()).
I'm not talking about complexity in the executable but about maintenance
complexity. |
|
Date |
User |
Action |
Args |
2010-01-28 23:51:07 | pitrou | set | recipients:
+ pitrou, lemburg, nascheme, schmir, kevinwatters, jnoller, brian.curtin, rcohen |
2010-01-28 23:51:05 | pitrou | link | issue7753 messages |
2010-01-28 23:51:05 | pitrou | create | |
|