Hello,
For my ARM processor (PXA255) i use kernel 2.6.22 and a kernel HZ value
of 1000.
I want to use that counter in my application. i use times() for that.
The manpage of times() says:
RETURN VALUE
The function times returns the number of clock ticks that have
elapsed
since an arbitrary point in the past. For Linux this point
is the
moment the system was booted. This return value may overflow the
pos-
sible range of type clock_t. On error, (clock_t) -1 is
returned, and
errno is set appropriately.
I expect when i run this code:
clock_t ticks;
ticks = times(NULL);
sleep(1);
ticks = times(NULL);
That the return value of times() is around 1000 ticks further.
In my application i see that this gives a result of 100 ticks further
instead of the expected 1000.
Am i doing something wrong here? Is this value converted to some sort of
userspace HZ?
I have tried it on x86 also and it gives the same behaviour.
Thanks,
Chris.
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ