2020-03-29 15:40:33 +00:00
|
|
|
#ifndef WF_TIMER_TIMEPOINT_H
|
|
|
|
#define WF_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
|
|
|
|
|
|
|
|
typedef uint64_t wf_timer_timepoint;
|
|
|
|
typedef int64_t wf_timer_timediff;
|
|
|
|
|
2020-03-29 15:40:33 +00:00
|
|
|
extern wf_timer_timepoint wf_timer_timepoint_now(void);
|
2020-02-29 20:06:40 +00:00
|
|
|
|
2020-03-29 15:40:33 +00:00
|
|
|
extern wf_timer_timepoint wf_timer_timepoint_in_msec(
|
2020-02-29 20:06:40 +00:00
|
|
|
wf_timer_timediff value);
|
|
|
|
|
2020-03-29 15:40:33 +00:00
|
|
|
extern bool wf_timer_timepoint_is_elapsed(
|
2020-02-29 20:06:40 +00:00
|
|
|
wf_timer_timepoint timepoint);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|