mirror of
https://github.com/apache/nuttx.git
synced 2026-09-20 04:47:58 +08:00
Use up_timer_gettime for CLOCK_MONOTONIC in tickless mode. From Max Neklyudov.
This commit is contained in:
committed by
Gregory Nutt
parent
a6d8d2c0d1
commit
61af0d511f
@@ -46,6 +46,7 @@
|
||||
#include <debug.h>
|
||||
|
||||
#include <arch/irq.h>
|
||||
#include <nuttx/arch.h>
|
||||
|
||||
#include "clock/clock.h"
|
||||
|
||||
@@ -117,7 +118,11 @@ int clock_gettime(clockid_t clock_id, struct timespec *tp)
|
||||
* reset.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_SCHED_TICKLESS
|
||||
ret = up_timer_gettime(tp);
|
||||
#else
|
||||
ret = clock_systimespec(tp);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user