Skip to content

Commit 63f081c

Browse files
wangchdoacassis
authored andcommitted
arm/lc823450: Use clock_systime_ticks() to access system ticks
Use clock_get_sched_tclock_systime_ticks() to access system ticks in order to fix the build error and improve code safety. Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
1 parent 1b58a44 commit 63f081c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm/src/lc823450/lc823450_timer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ int up_rtc_gettime(struct timespec *tp)
705705

706706
/* Get the elapsed time */
707707

708-
elapsed = NSEC_PER_TICK * (uint64_t)g_system_ticks;
708+
elapsed = NSEC_PER_TICK * (uint64_t)clock_systime_ticks();
709709

710710
/* Add the timer fraction in nanoseconds */
711711

0 commit comments

Comments
 (0)