perf: Fix timestamp computation on MacOS X

The OIL routines don't work as expected on MacOS X. The operating
system gives access to the timestamp counter through the function
mach_absolute_time.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Andrea Canciani 2010-02-05 22:34:51 +01:00
parent 55ce0b7748
commit a81d347c24

View file

@ -132,6 +132,13 @@ oil_profile_stamp_s390(void)
#endif
#endif
#if defined(__APPLE__)
#include <mach/mach_time.h>
#undef OIL_STAMP
#define OIL_STAMP mach_absolute_time
#endif
typedef struct _cairo_perf_timer {
#if defined(CLOCK)
struct timespec tv_start;