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

Unified Diff: time_posix.cc

Issue 6683025: Make time_posix.cc build in Native Client... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/base/
Patch Set: Created 9 years, 9 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: time_posix.cc
===================================================================
--- time_posix.cc (revision 77923)
+++ time_posix.cc (working copy)
@@ -109,8 +109,10 @@
timestruct.tm_wday = exploded.day_of_week; // mktime/timegm ignore this
timestruct.tm_yday = 0; // mktime/timegm ignore this
timestruct.tm_isdst = -1; // attempt to figure it out
+#if !defined(OS_NACL)
timestruct.tm_gmtoff = 0; // not a POSIX field, so mktime/timegm ignore
timestruct.tm_zone = NULL; // not a POSIX field, so mktime/timegm ignore
+#endif
time_t seconds;
if (is_local)
@@ -179,6 +181,15 @@
return TimeTicks(absolute_micro);
}
+#elif defined(OS_NACL)
+
+TimeTicks TimeTicks::Now() {
+ // Sadly, Native Client does not have _POSIX_TIMERS enabled in sys/features.h
+ // Apparently NaCl only has CLOCK_REALTIME:
+ // http://code.google.com/p/nativeclient/issues/detail?id=1159
+ return TimeTicks(clock());
+}
+
#else // _POSIX_MONOTONIC_CLOCK
#error No usable tick clock function on this platform.
#endif // _POSIX_MONOTONIC_CLOCK
« 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