From 416c315f928110b37f9b7a362f4dd2f2d89b0cac Mon Sep 17 00:00:00 2001 From: wangchengdong Date: Tue, 6 Jan 2026 12:16:22 +0800 Subject: [PATCH] ostest: sync hrtimer ostest with hrtimer updates Update the hrtimer ostest to reflect recent changes in the hrtimer implementation. Signed-off-by: Chengdong Wang --- testing/ostest/hrtimer.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/testing/ostest/hrtimer.c b/testing/ostest/hrtimer.c index 9b2d61430..fcbe1f5d9 100644 --- a/testing/ostest/hrtimer.c +++ b/testing/ostest/hrtimer.c @@ -120,19 +120,23 @@ static void hrtimer_test_init(FAR struct hrtimer_test_s *hrtimer_test, * * Input Parameters: * hrtimer - Pointer to the expired HRTimer instance + * expired - The expired value of hrtimer * * Returned Value: * Timer period in nanoseconds (NSEC_PER_50MS) * ****************************************************************************/ -static uint32_t test_hrtimer_callback(FAR hrtimer_t *hrtimer) +static uint64_t +test_hrtimer_callback(FAR hrtimer_t *hrtimer, uint64_t expired) { struct timespec ts; uint32_t diff; uint64_t now; int ret; + UNUSED(expired); + FAR struct hrtimer_test_s *test = (FAR struct hrtimer_test_s *)hrtimer; @@ -207,9 +211,7 @@ void hrtimer_test(void) /* Initialize the high-resolution timer */ - hrtimer_init(&hrtimer_test.timer, - test_hrtimer_callback, - NULL); + hrtimer_init(&hrtimer_test.timer, test_hrtimer_callback); /* Start the timer with 500ms relative timeout */