diff options
author | Benny Baumann <BenBE@geshi.org> | 2021-08-25 20:45:00 +0200 |
---|---|---|
committer | Benny Baumann <BenBE@geshi.org> | 2021-08-25 20:45:00 +0200 |
commit | 16faf82739f8b85515174b916b03efa63d53ae8a (patch) | |
tree | da3bb625ae573c6568a0b49f4f1a4938108d7aa3 /darwin | |
parent | df17374a92f7af03ae2c255a92f132056bf6a0fc (diff) |
Clarify naming of Platform_nanosecondsPerSchedulerTick
Diffstat (limited to 'darwin')
-rw-r--r-- | darwin/Platform.c | 8 | ||||
-rw-r--r-- | 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); |