This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git

commit 840c4fceefb459191bf26a356fa3ff8d6c5aeda8
Author: wangchengdong <[email protected]>
AuthorDate: Tue Jan 20 10:48:28 2026 +0800

    ostest/hrtimer: align hrtimer callback declaration
    
      align hrtimer callback declaration with latest update of hrtimer
    
    Signed-off-by: Chengdong Wang <[email protected]>
---
 testing/ostest/hrtimer.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/testing/ostest/hrtimer.c b/testing/ostest/hrtimer.c
index 3943140e6..1094167ac 100644
--- a/testing/ostest/hrtimer.c
+++ b/testing/ostest/hrtimer.c
@@ -128,7 +128,7 @@ static void hrtimer_test_init(FAR struct hrtimer_test_s 
*hrtimer_test,
  ****************************************************************************/
 
 static uint64_t
-test_hrtimer_callback(FAR hrtimer_t *hrtimer, uint64_t expired)
+test_hrtimer_callback(FAR const hrtimer_t *hrtimer, uint64_t expired)
 {
   struct timespec ts;
   uint32_t diff;
@@ -167,15 +167,15 @@ test_hrtimer_callback(FAR hrtimer_t *hrtimer, uint64_t 
expired)
 
   /* Stop the test after 15 expirations */
 
-  if (test->count >= 15)
+  if (test->count < 15)
+    {
+      return test->period;
+    }
+  else
     {
-      ret = hrtimer_cancel(hrtimer);
-      HRTIMER_TEST(ret, 0);
-
       test->active = false;
+      return 0;
     }
-
-  return test->period;
 }
 
 /****************************************************************************

Reply via email to