Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1171)

Unified Diff: base/time/time_posix.cc

Issue 600013003: Avoid 64-bit divide when sampling timestamp (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: formatting Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/time/time_posix.cc
diff --git a/base/time/time_posix.cc b/base/time/time_posix.cc
index dcbd83cd54e4fb7b769ded532b2ed9b5bf626f47..ad00c513685c2ce4891c7f958520543e167a7f6c 100644
--- a/base/time/time_posix.cc
+++ b/base/time/time_posix.cc
@@ -98,7 +98,7 @@ base::TimeTicks ClockNow(clockid_t clk_id) {
absolute_micro =
(static_cast<int64>(ts.tv_sec) * base::Time::kMicrosecondsPerSecond) +
- (static_cast<int64>(ts.tv_nsec) / base::Time::kNanosecondsPerMicrosecond);
+ (static_cast<int64>(ts.tv_nsec / base::Time::kNanosecondsPerMicrosecond));
jamesr 2014/09/29 23:37:31 i'm pretty sure this doesn't actually help, since
Peter Kasting 2014/09/30 00:22:15 This. I'm in the process of cleaning up our 64-bi
return base::TimeTicks::FromInternalValue(absolute_micro);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698