Feb. 11, 2012
1:29 p.m.
Hi Michi,
Why don't you print the tv_sec part?
It is expected that tv_sec is always zero. But I'll fix the code to check if it really is.
You might also want to replace getnstimeofday with getrawmonotonic or any other monotonic time source. If ntp or something else decides to change system time during the measurement, you would probably get weird results.
I got the getnstimeofday() from line 333 of <linux/ktime.h> /* Get the real (wall-) time in timespec format: */ #define ktime_get_real_ts(ts) getnstimeofday(ts) If the clock changes in the worst time possible, it may affect only one result. But I'll check other functions. Thanks! Peter -- Peter Senna Tschudin peter.senna@gmail.com gpg id: 48274C36