mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
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:
parent
73bc5cbcc6
commit
416c315f92
1 changed files with 6 additions and 4 deletions
|
|
@ -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 */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue