14#define NSEC(t) ((interval_t)(t * 1LL))
15#define NSECS(t) ((interval_t)(t * 1LL))
16#define USEC(t) ((interval_t)(t * 1000LL))
17#define USECS(t) ((interval_t)(t * 1000LL))
18#define MSEC(t) ((interval_t)(t * 1000000LL))
19#define MSECS(t) ((interval_t)(t * 1000000LL))
20#define SEC(t) ((interval_t)(t * 1000000000LL))
21#define SECS(t) ((interval_t)(t * 1000000000LL))
22#define SECOND(t) ((interval_t)(t * 1000000000LL))
23#define SECONDS(t) ((interval_t)(t * 1000000000LL))
24#define MINUTE(t) ((interval_t)(t * 60000000000LL))
25#define MINUTES(t) ((interval_t)(t * 60000000000LL))
26#define HOUR(t) ((interval_t)(t * 3600000000000LL))
27#define HOURS(t) ((interval_t)(t * 3600000000000LL))
28#define DAY(t) ((interval_t)(t * 86400000000000LL))
29#define DAYS(t) ((interval_t)(t * 86400000000000LL))
30#define WEEK(t) ((interval_t)(t * 604800000000000LL))
31#define WEEKS(t) ((interval_t)(t * 604800000000000LL))
33#define NEVER ((interval_t)LLONG_MIN)
34#define NEVER_MICROSTEP 0u
35#define FOREVER ((interval_t)LLONG_MAX)
36#define FOREVER_MICROSTEP UINT_MAX
38 (tag_t) { .time = NEVER, .microstep = NEVER_MICROSTEP }
40#define NEVER_TAG_INITIALIZER {NEVER, NEVER_MICROSTEP}
42 (tag_t) { .time = FOREVER, .microstep = FOREVER_MICROSTEP }
44#define FOREVER_TAG_INITIALIZER {FOREVER, FOREVER_MICROSTEP}
45#define ZERO_TAG (tag_t){.time = 0LL, .microstep = 0u}
48#define CHECK_TIMEOUT(start, duration) (lf_time_physical() > ((start) + (duration)))
51#define BILLION ((instant_t)1000000000LL)
228#define LF_TIME_BUFFER_LENGTH 64
#define lf_tag()
Definition reaction_macros.h:189
#define lf_time_logical()
Definition reaction_macros.h:194
#define lf_time_logical_elapsed()
Definition reaction_macros.h:200
microstep_t microstep
Definition tag.h:80
instant_t time
Definition tag.h:79
instant_t lf_time_add(instant_t a, interval_t b)
Return the sum of an interval and an instant, saturating on overflow and underflow.
Definition tag.c:42
size_t lf_readable_time(char *buffer, instant_t time)
Definition tag.c:164
int lf_tag_compare(tag_t tag1, tag_t tag2)
Definition tag.c:104
instant_t lf_time_physical(void)
Definition tag.c:153
int64_t instant_t
Definition tag.h:63
instant_t lf_time_start(void)
Definition tag.c:162
instant_t lf_time_subtract(instant_t a, interval_t b)
Return an instant minus an interval, saturating on overflow and underflow.
Definition tag.c:61
instant_t lf_time_physical_elapsed(void)
Definition tag.c:160
tag_t lf_tag_add(tag_t a, tag_t b)
Definition tag.c:80
uint32_t microstep_t
Definition tag.h:73
size_t lf_comma_separated_time(char *buffer, instant_t time)
Definition tag.c:248
int64_t interval_t
Definition tag.h:68
tag_t lf_delay_strict(tag_t tag, interval_t interval)
Definition tag.c:137
tag_t lf_delay_tag(tag_t tag, interval_t interval)
Definition tag.c:118
char buffer[BUFFER_SIZE]
Definition trace_util.c:42