Fix off-by-1000 for GTimer

Divide monotonic time by 1e6 not 1e9 to get seconds.
This commit is contained in:
Owen W. Taylor 2010-11-21 21:59:57 -05:00
parent ab3a79e2c9
commit a70ba9c8b1

View File

@ -233,10 +233,10 @@ g_timer_elapsed (GTimer *timer,
elapsed = timer->end - timer->start;
total = elapsed / 1e9;
total = elapsed / 1e6;
if (microseconds)
*microseconds = (elapsed / 1000) % 1000000;
*microseconds = elapsed % 1000000;
return total;
}