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 \
41 { NEVER, NEVER_MICROSTEP }
43 (tag_t) { .time = FOREVER, .microstep = FOREVER_MICROSTEP }
45#define FOREVER_TAG_INITIALIZER \
46 { FOREVER, FOREVER_MICROSTEP }
48 (tag_t) { .time = 0LL, .microstep = 0u }
51#define CHECK_TIMEOUT(start, duration) (lf_time_physical() > ((start) + (duration)))
54#define BILLION ((instant_t)1000000000LL)
222#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:83
instant_t time
Definition tag.h:82
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:145
int lf_tag_compare(tag_t tag1, tag_t tag2)
Definition tag.c:85
instant_t lf_time_physical(void)
Definition tag.c:134
int64_t instant_t
Definition tag.h:66
instant_t lf_time_start(void)
Definition tag.c:143
instant_t lf_time_physical_elapsed(void)
Definition tag.c:141
tag_t lf_tag_add(tag_t a, tag_t b)
Definition tag.c:61
uint32_t microstep_t
Definition tag.h:76
size_t lf_comma_separated_time(char *buffer, instant_t time)
Definition tag.c:229
int64_t interval_t
Definition tag.h:71
tag_t lf_delay_strict(tag_t tag, interval_t interval)
Definition tag.c:118
tag_t lf_delay_tag(tag_t tag, interval_t interval)
Definition tag.c:99
char buffer[BUFFER_SIZE]
Definition trace_util.c:42