Skip to content

Commit

Permalink
hrt.c: Remove hrt_elapsed_time_atomic (it is unused)
Browse files Browse the repository at this point in the history
Remove dead code
  • Loading branch information
pussuw committed Dec 10, 2024
1 parent 7659da3 commit 81a38b0
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions platforms/nuttx/src/px4/microchip/mpfs/hrt/hrt.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,21 +212,6 @@ hrt_absolute_time(void)
return getreg64(MPFS_CLINT_MTIME);
}

/**
* Compare a time value with the current time as atomic operation
*/
hrt_abstime
hrt_elapsed_time_atomic(const volatile hrt_abstime *then)
{
irqstate_t flags = spin_lock_irqsave_wo_note(&g_hrt_lock);

hrt_abstime delta = hrt_absolute_time() - *then;

spin_unlock_irqrestore_wo_note(&g_hrt_lock, flags);

return delta;
}

/**
* Store the absolute time in an interrupt-safe fashion
*/
Expand Down

0 comments on commit 81a38b0

Please sign in to comment.