hrt: remove hrt_elapsed_time_atomic

There's no protection on posix
This commit is contained in:
Beat Küng
2021-09-23 09:23:08 +02:00
parent 6f902e54f9
commit e73172b537
9 changed files with 3 additions and 87 deletions
@@ -157,20 +157,6 @@ hrt_abstime ts_to_abstime(const struct timespec *ts)
return result;
}
/*
* Compute the delta between a timestamp taken in the past
* and now.
*
* This function is safe to use even if the timestamp is updated
* by an interrupt during execution.
*/
hrt_abstime hrt_elapsed_time_atomic(const volatile hrt_abstime *then)
{
// This is not atomic as the value on the application layer of POSIX is limited.
hrt_abstime delta = hrt_absolute_time() - *then;
return delta;
}
/*
* Store the absolute time in an interrupt-safe fashion.
*