From 16faf82739f8b85515174b916b03efa63d53ae8a Mon Sep 17 00:00:00 2001 From: Benny Baumann Date: Wed, 25 Aug 2021 20:45:00 +0200 Subject: Clarify naming of Platform_nanosecondsPerSchedulerTick --- darwin/Platform.c | 8 ++++---- darwin/Platform.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/darwin/Platform.c b/darwin/Platform.c index c5a11df2..7d2d1697 100644 --- a/darwin/Platform.c +++ b/darwin/Platform.c @@ -122,7 +122,7 @@ const MeterClass* const Platform_meterTypes[] = { static double Platform_nanosecondsPerMachTick = 1.0; -static double Platform_schedulerTicksPerNS = -1; +static double Platform_nanosecondsPerSchedulerTick = -1; void Platform_init(void) { // Check if we can determine the timebase used on this system. @@ -144,7 +144,7 @@ void Platform_init(void) { } const double nanos_per_sec = 1e9; - Platform_schedulerTicksPerNS = nanos_per_sec / scheduler_ticks_per_sec; + Platform_nanosecondsPerSchedulerTick = nanos_per_sec / scheduler_ticks_per_sec; } // Converts ticks in the Mach "timebase" to nanoseconds. @@ -154,9 +154,9 @@ 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. +// See `sysconf(_SC_CLK_TCK)`, as used to define the `Platform_nanosecondsPerSchedulerTick` constant. double Platform_schedulerTicksToNanoseconds(const double scheduler_ticks) { - return scheduler_ticks * Platform_schedulerTicksPerNS; + return scheduler_ticks * Platform_nanosecondsPerSchedulerTick; } void Platform_done(void) { diff --git a/darwin/Platform.h b/darwin/Platform.h index b907a8d5..cd90dd96 100644 --- a/darwin/Platform.h +++ b/darwin/Platform.h @@ -40,7 +40,7 @@ void Platform_init(void); 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. +// See `sysconf(_SC_CLK_TCK)`, as used to define the `Platform_nanosecondsPerSchedulerTick` constant. double Platform_schedulerTicksToNanoseconds(const double scheduler_ticks); void Platform_done(void); -- cgit v1.2.3