summaryrefslogtreecommitdiffstats
path: root/darwin/Platform.h
diff options
context:
space:
mode:
Diffstat (limited to 'darwin/Platform.h')
-rw-r--r--darwin/Platform.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/darwin/Platform.h b/darwin/Platform.h
index b1733a56..b907a8d5 100644
--- a/darwin/Platform.h
+++ b/darwin/Platform.h
@@ -27,10 +27,6 @@ in the source distribution for its full text.
extern const ProcessField Platform_defaultFields[];
-extern double Platform_timebaseToNS;
-
-extern long Platform_clockTicksPerSec;
-
extern const SignalItem Platform_signals[];
extern const unsigned int Platform_numberOfSignals;
@@ -39,6 +35,14 @@ extern const MeterClass* const Platform_meterTypes[];
void Platform_init(void);
+// Converts ticks in the Mach "timebase" to nanoseconds.
+// See `mach_timebase_info`, as used to define the `Platform_nanosecondsPerMachTick` constant.
+uint64_t Platform_machTicksToNanoseconds(uint64_t mach_ticks);
+
+// Converts "scheduler ticks" to nanoseconds.
+// See `sysconf(_SC_CLK_TCK)`, as used to define the `Platform_schedulerTicksPerNS` constant.
+double Platform_schedulerTicksToNanoseconds(const double scheduler_ticks);
+
void Platform_done(void);
void Platform_setBindings(Htop_Action* keys);