On Wednesday 15 April 2015 19:56:44 Baolin Wang wrote:
if (flags & TIMER_ABSTIME) {
struct timespec n;
unsigned long now;struct timespec64 n;
getnstimeofday(&n);
now = timespec_to_ns(&n);
getnstimeofdayi64(&n);
if (when > now) when -= now; elsenow = timespec64_to_ns(&n);
You have a small typo here: getnstimeofday64() instead of getnstimeofdayi64().
Actually, this code could be simplified by using ktime_get_real_ns(), and at the time void the use of the temporary timespec64 value.
Arnd