Skip to content

Commit

Permalink
tv.h: added more unit-convert macros
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinPulec committed Nov 13, 2024
1 parent f39e24e commit 352eab7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/tv.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ typedef long long time_ns_t;
#define US_TO_MS(val_us) ((val_us) / 1000)
#define MS_TO_US(val_ms) ((val_ms) * 1000)
#define NS_TO_MS(val_ns) ((val_ns) / 1000 / 1000)
#define NS_TO_US(val_ns) ((val_ns) / 1000)
#define MS_TO_NS(val_ms) ((val_ms) * 1000)
#define SEC_TO_NS(val_sec) ((val_sec) * 1000LL * 1000 * 1000)

static inline time_ns_t get_time_in_ns() {
#ifdef HAVE_TIMESPEC_GET
Expand Down

0 comments on commit 352eab7

Please sign in to comment.