[uClibc] clock() for long-running process

Atsushi Nemoto anemo at mba.ocn.ne.jp
Sat May 1 11:58:02 UTC 2004


>>>>> On Fri, 30 Apr 2004 08:42:33 -0600, mjn3 at codepoet.org (Manuel Novoa III) said:
>> How about this patch?

mjn3> Hmm... I don't think that's consistent.  If we want clock_t to
mjn3> wrap, then we'd never want to return (clock_t)-1 unless the
mjn3> value is not available.  I'll look into it later today or this
mjn3> weekend.

Well, it might be better taking care of such case.  But glibc's clock
just ignore it, JFYI.

Anyway, fortunately, it never returns (clock_t)-1 (if CLK_TCK=100)
because 4294967295 is not a multiple of (1000000 / 100) :-)

---
Atsushi Nemoto



More information about the uClibc mailing list