summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Hughes2015-01-09 18:16:53 -0600
committerElliott Hughes2015-01-09 18:17:46 -0600
commit76f0a84f6ac27669d77260e83f17cf6ba5b253ba (patch)
tree240ba0e15d64f1c26700fd07bb8c1275fb2fd33f /libpixelflinger
parent4c6c6d1c7ed7d8481d717f949c18657efa5533af (diff)
downloadplatform-system-core-76f0a84f6ac27669d77260e83f17cf6ba5b253ba.tar.gz
platform-system-core-76f0a84f6ac27669d77260e83f17cf6ba5b253ba.tar.xz
platform-system-core-76f0a84f6ac27669d77260e83f17cf6ba5b253ba.zip
Linux always has POSIX clocks available.
pixelflinger doesn't have to run on the Mac, but the Condition code might. Change-Id: Ib4e9b4daa6e848ffd5742959427b172d45f08e3c
Diffstat (limited to 'libpixelflinger')
-rw-r--r--libpixelflinger/pixelflinger.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/libpixelflinger/pixelflinger.cpp b/libpixelflinger/pixelflinger.cpp
index ea5bc8e76..fd449b2eb 100644
--- a/libpixelflinger/pixelflinger.cpp
+++ b/libpixelflinger/pixelflinger.cpp
@@ -727,18 +727,10 @@ void ggl_enable_texture2d(context_t* c, int enable)
727 727
728int64_t ggl_system_time() 728int64_t ggl_system_time()
729{ 729{
730#if defined(HAVE_POSIX_CLOCKS)
731 struct timespec t; 730 struct timespec t;
732 t.tv_sec = t.tv_nsec = 0; 731 t.tv_sec = t.tv_nsec = 0;
733 clock_gettime(CLOCK_THREAD_CPUTIME_ID, &t); 732 clock_gettime(CLOCK_THREAD_CPUTIME_ID, &t);
734 return int64_t(t.tv_sec)*1000000000LL + t.tv_nsec; 733 return int64_t(t.tv_sec)*1000000000LL + t.tv_nsec;
735#else
736 // we don't support the clocks here.
737 struct timeval t;
738 t.tv_sec = t.tv_usec = 0;
739 gettimeofday(&t, NULL);
740 return int64_t(t.tv_sec)*1000000000LL + int64_t(t.tv_usec)*1000LL;
741#endif
742} 734}
743 735
744// ---------------------------------------------------------------------------- 736// ----------------------------------------------------------------------------