util/time: move timespec_sub to time utilities

This commit is contained in:
Tudor Brindus 2020-06-05 17:56:13 -04:00 committed by Simon Ser
parent c9c31f803e
commit 363bf44a35
3 changed files with 19 additions and 11 deletions

View file

@ -13,4 +13,10 @@ uint32_t get_current_time_msec(void);
*/
int64_t timespec_to_msec(const struct timespec *a);
/**
* Subtracts timespec `b` from timespec `a`, and stores the difference in `r`.
*/
void timespec_sub(struct timespec *r, const struct timespec *a,
const struct timespec *b);
#endif