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

Unified Diff: third_party/WebKit/Source/wtf/CurrentTime.h

Issue 1936853002: Assert event timestamp to be monotonic and not from future Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change to histogram Created 4 years, 2 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
Index: third_party/WebKit/Source/wtf/CurrentTime.h
diff --git a/third_party/WebKit/Source/wtf/CurrentTime.h b/third_party/WebKit/Source/wtf/CurrentTime.h
index cfddcbea114c1e46c427a8e2a087298a2f0252ef..d1f97c1f1e9148b0ec8150f7433aa917f84f79e6 100644
--- a/third_party/WebKit/Source/wtf/CurrentTime.h
+++ b/third_party/WebKit/Source/wtf/CurrentTime.h
@@ -59,10 +59,17 @@ inline double monotonicallyIncreasingTimeMS()
using TimeFunction = double (*)();
-// Make all the time functions (currentTime(), monotonicallyIncreasingTime(), systemTraceTime()) return the result
-// of the supplied function. Returns the pointer to the old time function. For both setting and getting, nullptr means
-// using the default timing function returning the actual time.
-WTF_EXPORT TimeFunction setTimeFunctionsForTesting(TimeFunction);
+// Make |currentTime()| function return the result of the supplied function.
+// Returns the pointer to the old time function. For both setting and getting,
+// nullptr means using the default timing function returning the actual time.
+WTF_EXPORT TimeFunction setCurrentTimeFunctionForTesting(TimeFunction);
+
+// Make |monotonicallyIncreasingTime()| function return the result of the
+// supplied function.
+// Returns the pointer to the old time function. For both setting and getting,
+// nullptr means using the default timing function returning the actual time.
+WTF_EXPORT TimeFunction setMonotonicallyIncreasingTimeFunctionForTesting(TimeFunction);
+
} // namespace WTF
@@ -71,6 +78,7 @@ using WTF::currentTimeMS;
using WTF::monotonicallyIncreasingTime;
using WTF::monotonicallyIncreasingTimeMS;
using WTF::TimeFunction;
-using WTF::setTimeFunctionsForTesting;
+using WTF::setCurrentTimeFunctionForTesting;
+using WTF::setMonotonicallyIncreasingTimeFunctionForTesting;
#endif // CurrentTime_h
« no previous file with comments | « third_party/WebKit/Source/web/tests/TextFinderTest.cpp ('k') | third_party/WebKit/Source/wtf/CurrentTime.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698