mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-29 16:00:17 +00:00
rtems: Use rtems_clock_get_ticks_per_second()
This avoids an integer division at runtime.
This commit is contained in:
@@ -46,8 +46,8 @@ rtems_status_code _TOD_Validate(
|
||||
return RTEMS_INVALID_ADDRESS;
|
||||
}
|
||||
|
||||
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
|
||||
rtems_configuration_get_microseconds_per_tick();
|
||||
ticks_per_second = rtems_clock_get_ticks_per_second();
|
||||
|
||||
if ((the_tod->ticks >= ticks_per_second) ||
|
||||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
|
||||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
|
||||
|
||||
Reference in New Issue
Block a user