Program Listing for File time.h
↰ Return to documentation for file (rcsw/utils/time.h
)
#pragma once
/*******************************************************************************
* Includes
******************************************************************************/
#include "rcsw/rcsw.h"
/*******************************************************************************
* API Functions
******************************************************************************/
BEGIN_C_DECLS
RCSW_API int time_ts_cmp(const struct timespec * a,
const struct timespec * b) RCSW_PURE;
RCSW_API void time_ts_add(struct timespec * __restrict__ sum,
const struct timespec * __restrict__ val);
RCSW_API void time_ts_diff(const struct timespec * __restrict__ start,
const struct timespec * __restrict__ end,
struct timespec * __restrict__ diff);
RCSW_API double time_ts2mono(const struct timespec* const ts) RCSW_PURE;
RCSW_API size_t time_ts2monons(const struct timespec* const ts) RCSW_PURE;
RCSW_API struct timespec time_monons2ts(size_t val);
RCSW_API status_t time_ts_make_abs(const struct timespec * __restrict__ rel,
struct timespec * out);
END_C_DECLS