mirror of
https://github.com/apache/nuttx.git
synced 2026-08-20 13:08:26 +00:00
Use up_timer_gettime for CLOCK_MONOTONIC in tickless mode. From Max Neklyudov.
This commit is contained in:
parent
a6d8d2c0d1
commit
61af0d511f
1 changed files with 5 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue