/* Not true gettimeofday, only checks the jiffies (uptime) + useconds */ void __INLINE__ do_gettimeofday_fast(struct timeval *tv) { unsigned long sec = jiffies; unsigned long usec = GET_JIFFIES_USEC(); usec += (sec % HZ) * (1000000 / HZ); sec = sec / HZ; if (usec > 1000000) { usec -= 1000000; sec++; } tv->tv_sec = sec; tv->tv_usec = usec; }
/* Not true gettimeofday, only checks the jiffies (uptime) + useconds */ inline void do_gettimeofday_fast(struct fasttime_t *tv) { tv->tv_jiff = jiffies; tv->tv_usec = GET_JIFFIES_USEC(); }