MCPcopy Create free account
hub / github.com/coreboot/coreboot / mono_time_cmp

Function mono_time_cmp

src/include/timer.h:78–88  ·  view source on GitHub ↗

Compare two absolute times: Return -1, 0, or 1 if t1 is <, =, or > t2, * respectively. */

Source from the content-addressed store, hash-verified

76/* Compare two absolute times: Return -1, 0, or 1 if t1 is <, =, or > t2,
77 * respectively. */
78static inline int mono_time_cmp(const struct mono_time *t1,
79 const struct mono_time *t2)
80{
81 if (t1->microseconds == t2->microseconds)
82 return 0;
83
84 if (t1->microseconds < t2->microseconds)
85 return -1;
86
87 return 1;
88}
89
90/* Return true if t1 after t2 */
91static inline int mono_time_after(const struct mono_time *t1,

Callers 6

timer_queue_insertFunction · 0.85
timer_queue_remove_headFunction · 0.85
mono_time_afterFunction · 0.85
mono_time_beforeFunction · 0.85
stopwatch_duration_usecsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected