2020-06-16 21:57:41 +00:00
|
|
|
#ifndef WFP_TIMER_TIMEPOINT_H
|
|
|
|
#define WFP_TIMER_TIMEPOINT_H
|
2020-02-29 20:06:40 +00:00
|
|
|
|
|
|
|
#ifndef __cplusplus
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <inttypes.h>
|
|
|
|
#else
|
|
|
|
#include <cinttypes>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
#endif
|
|
|
|
|
2020-06-16 21:57:41 +00:00
|
|
|
typedef uint64_t wfp_timer_timepoint;
|
|
|
|
typedef int64_t wfp_timer_timediff;
|
2020-02-29 20:06:40 +00:00
|
|
|
|
2020-06-16 21:57:41 +00:00
|
|
|
extern wfp_timer_timepoint wfp_timer_timepoint_now(void);
|
2020-02-29 20:06:40 +00:00
|
|
|
|
2020-06-16 21:57:41 +00:00
|
|
|
extern wfp_timer_timepoint wfp_timer_timepoint_in_msec(
|
|
|
|
wfp_timer_timediff value);
|
2020-02-29 20:06:40 +00:00
|
|
|
|
2020-06-16 21:57:41 +00:00
|
|
|
extern bool wfp_timer_timepoint_is_elapsed(
|
|
|
|
wfp_timer_timepoint timepoint);
|
2020-02-29 20:06:40 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|