Mach trap#-88
svc · mach trap -88
mach_timebase_info
Return the numer/denom ratio used to convert mach_absolute_time ticks to nanoseconds.
Prototype
kern_return_t mach_timebase_info(/* 1 args */);Returns: kern_return_t
Version history
| XNU tag | macOS | # |
|---|---|---|
| xnu-123.5 | macOS 10.0 Cheetah | -88 |
| xnu-201 | macOS 10.1 Puma | -88 |
| xnu-344 | macOS 10.2 Jaguar | -88 |
| xnu-517 | macOS 10.3 Panther | -88 |
| xnu-124.1 | — | -88 |
| xnu-124.13 | — | -88 |
| xnu-124.7 | — | -88 |
| xnu-201.14 | — | -88 |
| xnu-201.19 | — | -88 |
| xnu-201.19.3 | — | -88 |
| xnu-201.42.3 | — | -88 |
| xnu-201.5 | — | -88 |
| xnu-344.12.2 | — | -88 |
| xnu-344.2 | — | -88 |
| xnu-344.21.73 | — | -88 |
| xnu-344.21.74 | — | -88 |
| xnu-344.23 | — | -88 |
| xnu-344.26 | — | -88 |
| xnu-344.32 | — | -88 |
| xnu-344.34 | — | -88 |
| xnu-344.49 | — | -88 |
| xnu-517.11.1 | — | -88 |
| xnu-517.12.7 | — | -88 |
| xnu-517.3.15 | — | -88 |
| xnu-517.3.7 | — | -88 |
| xnu-517.7.21 | — | -88 |
| xnu-517.7.7 | — | -88 |
| xnu-517.9.4 | — | -88 |
| xnu-517.9.5 | — | -88 |
Notes
Fills a mach_timebase_info_data_t with the rational (numer, denom) such that nanoseconds = ticks * numer / denom. On Apple Silicon the ratio is typically 125/3 (24 MHz timer), on Intel it is usually 1/1. The ratio is constant for the lifetime of the system, so callers normally cache the result in a static once-block.
Related APIs
mach_timebase_info_trapmach_absolute_timemach_continuous_timeclock_gettime_nsec_np