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

Unified Diff: third_party/WebKit/Source/platform/wtf/Time.h

Issue 2928833002: [CacheStorage] [DevTools] Added "Time Received" column to cache storage data grid (Closed)
Patch Set: Created 3 years, 6 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/platform/wtf/Time.h
diff --git a/third_party/WebKit/Source/platform/wtf/Time.h b/third_party/WebKit/Source/platform/wtf/Time.h
index 357004c8b242e50bdd4929a21a00ff7124dfc155..ec6490d041c10f3fcd1265d6f459b10f60b1056e 100644
--- a/third_party/WebKit/Source/platform/wtf/Time.h
+++ b/third_party/WebKit/Source/platform/wtf/Time.h
@@ -40,6 +40,8 @@ class TimeWrapper {
int64_t ToInternalValueForTesting() const { return value_.ToInternalValue(); }
+ time_t ToTimeT() const { return value_.ToTimeT(); }
+
// Only use this conversion when interfacing with legacy code that represents
// time in double. Converting to double can lead to losing information for
// large time values.
@@ -49,6 +51,10 @@ class TimeWrapper {
return WrappedTimeType() + TimeDelta::FromSecondsD(seconds);
}
+ static TimeWrapper FromInternalValue(int64_t us) {
+ return Time::FromInternalValue(us);
+ }
+
TimeWrapper& operator=(TimeWrapper other) {
value_ = other.value_;
return *this;

Powered by Google App Engine
This is Rietveld 408576698