mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-24 15:40:31 +08:00
platforms/rpi: Clean away the removed hrt_elapsed_time_atomic
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
This commit is contained in:
committed by
Beat Küng
parent
77f71e61d2
commit
aae0876d82
@@ -497,20 +497,6 @@ hrt_abstime hrt_absolute_time(void)
|
||||
return ((uint64_t) hi << 32) | lo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 = px4_enter_critical_section();
|
||||
|
||||
hrt_abstime delta = hrt_absolute_time() - *then;
|
||||
|
||||
px4_leave_critical_section(flags);
|
||||
|
||||
return delta;
|
||||
}
|
||||
|
||||
/**
|
||||
* Store the absolute time in an interrupt-safe fashion
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user