You were close.
Programming error on my part.
This modified subroutine does correct my test.
Notice the (LL) cast on 1000000
Computation was done on 32 bits integer then assign on the 64 bits integer.
sorry.
ps: It may help explain the other > 1 hour time jump I've seen in an
other thread.
LL GetTime (void)
{
struct timeval tv;
LL retval;
int rc;
while (0 != (rc = gettimeofday (&tv, NULL)))
printf ("Wow! gettimeofday () returned %d\n", rc);
retval = (tv.tv_sec * (LL)1000000) + (tv.tv_usec);
return retval;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/