Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2014-08-06 02:06:45 +0400
committerRussell Belfer <rb@github.com>2014-08-06 02:06:45 +0400
commit3822d2cc4f4a171fdcf8dcfa7c7338b889c43c61 (patch)
tree29ef4f37e1985ecce493d04c79c637f79abfc08b /src/util.h
parent59e3f45b6150984e6a74ce79062caa459eda369f (diff)
Fix typo in timer normalization constants
The effect of this would be that various update callbacks would not be made at the correct interval.
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h6
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;
}
}