ostest: sync hrtimer ostest with hrtimer updates

Update the hrtimer ostest to reflect recent changes in the hrtimer
implementation.

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
This commit is contained in:
wangchengdong 2026-01-06 12:16:22 +08:00 committed by Xiang Xiao
parent 73bc5cbcc6
commit 416c315f92

View file

@ -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 */