Fix typo in timer normalization constants

The effect of this would be that various update callbacks would
not be made at the correct interval.
This commit is contained in:
Russell Belfer 2014-08-05 15:06:45 -07:00
parent 59e3f45b61
commit 3822d2cc4f

View File

@ -419,7 +419,7 @@ GIT_INLINE(double) git__timer(void)
scaling_factor = (double)info.numer / (double)info.denom;
}
return (double)time * scaling_factor / 1.0E-9;
return (double)time * scaling_factor / 1.0E9;
}
#else
@ -431,13 +431,13 @@ GIT_INLINE(double) git__timer(void)
struct timespec tp;
if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0) {
return (double) tp.tv_sec + (double) tp.tv_nsec / 1E-9;
return (double) tp.tv_sec + (double) tp.tv_nsec / 1.0E9;
} else {
/* Fall back to using gettimeofday */
struct timeval tv;
struct timezone tz;
gettimeofday(&tv, &tz);
return (double)tv.tv_sec + (double)tv.tv_usec / 1E-6;
return (double)tv.tv_sec + (double)tv.tv_usec / 1.0E6;
}
}