summaryrefslogtreecommitdiffstats
path: root/Source/WTF/wtf/CurrentTime.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-07-23 09:28:44 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-07-23 09:28:44 +0200
commit815f1ed417bd26fbe2abbdf20ac5d3423b30796c (patch)
tree923c9a9e2834ccab60f5caecfb8f0ac410c1dd9e /Source/WTF/wtf/CurrentTime.cpp
parentb4ad5d9d2b96baacd0180ead50de5195ca78af2d (diff)
Imported WebKit commit e65cbc5b6ac32627c797e7fc7f46eb7794410c92 (http://svn.webkit.org/repository/webkit/trunk@123308)
New snapshot with better configure tests
Diffstat (limited to 'Source/WTF/wtf/CurrentTime.cpp')
-rw-r--r--Source/WTF/wtf/CurrentTime.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/Source/WTF/wtf/CurrentTime.cpp b/Source/WTF/wtf/CurrentTime.cpp
index 325630981..155051ac7 100644
--- a/Source/WTF/wtf/CurrentTime.cpp
+++ b/Source/WTF/wtf/CurrentTime.cpp
@@ -252,6 +252,16 @@ double currentTime()
return ecore_time_unix_get();
}
+#elif OS(QNX)
+
+double currentTime()
+{
+ struct timespec time;
+ if (clock_gettime(CLOCK_REALTIME, &time))
+ CRASH();
+ return time.tv_sec + time.tv_nsec / 1.0e9;
+}
+
#else
double currentTime()
@@ -299,6 +309,16 @@ double monotonicallyIncreasingTime()
return timer.nsecsElapsed() / 1.0e9;
}
+#elif OS(QNX)
+
+double monotonicallyIncreasingTime()
+{
+ struct timespec time;
+ if (clock_gettime(CLOCK_MONOTONIC, &time))
+ CRASH();
+ return time.tv_sec + time.tv_nsec / 1.0e9;
+}
+
#else
double monotonicallyIncreasingTime()