aboutsummaryrefslogtreecommitdiffstats
path: root/pugl/pugl_osx.m
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-07-21 09:54:54 +0200
committerDavid Robillard <d@drobilla.net>2019-07-21 14:44:19 +0200
commit753af54d546963bd86c64ca3c5dde5cc8c92c4c8 (patch)
tree86109f79f8dda2394f43c5bb4aac044e19d5170a /pugl/pugl_osx.m
parent5ba0ea7cd8cfec3f374f380a03e144e24f43a12c (diff)
downloadpugl-753af54d546963bd86c64ca3c5dde5cc8c92c4c8.tar.gz
pugl-753af54d546963bd86c64ca3c5dde5cc8c92c4c8.tar.bz2
pugl-753af54d546963bd86c64ca3c5dde5cc8c92c4c8.zip
Make time start from approximately zero
Diffstat (limited to 'pugl/pugl_osx.m')
-rw-r--r--pugl/pugl_osx.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/pugl/pugl_osx.m b/pugl/pugl_osx.m
index 519b7dd..1870207 100644
--- a/pugl/pugl_osx.m
+++ b/pugl/pugl_osx.m
@@ -743,7 +743,7 @@ puglGetTime(PuglView* view)
{
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
- return (double)ts.tv_sec + ts.tv_nsec / 1000000000.0;
+ return ((double)ts.tv_sec + ts.tv_nsec / 1000000000.0) - view->start_time;
}
void