diff options
author | Vicent Marti <vicent@github.com> | 2014-08-09 00:35:08 +0200 |
---|---|---|
committer | Vicent Marti <vicent@github.com> | 2014-08-09 00:35:08 +0200 |
commit | bb9e6028b8ec54c01b35f838e8eca7c81d4b751a (patch) | |
tree | cd72c4918d4116244fd55ff2d15d7c5e8cf7816e | |
parent | 35f186b6ca84a5e95de2e735834a87e19e7031d2 (diff) | |
parent | 3822d2cc4f4a171fdcf8dcfa7c7338b889c43c61 (diff) | |
download | libgit2-bb9e6028b8ec54c01b35f838e8eca7c81d4b751a.tar.gz |
Merge pull request #2507 from libgit2/rb/timer-typo
Typo in timer constants
-rw-r--r-- | src/util.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/util.h b/src/util.h index ca676c039..6e57ad8c3 100644 --- a/src/util.h +++ b/src/util.h @@ -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; } } |