mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 22:48:07 +02:00
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:
parent
55ce0b7748
commit
a81d347c24
1 changed files with 7 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue