mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-30 17:49:02 +00:00
utils: Make all the NSEC_PER_XXX constants 64 bit
Code dealing with nanosecond timestamps normally uses 64 bit integers and not long long ints. So this makes it easier to print the value of expressions using these constants. Signed-off-by: Francois Gouget <fgouget@codeweavers.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
parent
94611ac175
commit
2bb96f105d
@ -52,9 +52,9 @@ static inline int test_bit(int index, uint32_t val)
|
||||
|
||||
typedef int64_t red_time_t;
|
||||
|
||||
#define NSEC_PER_SEC 1000000000LL
|
||||
#define NSEC_PER_MILLISEC 1000000
|
||||
#define NSEC_PER_MICROSEC 1000
|
||||
#define NSEC_PER_SEC INT64_C(1000000000)
|
||||
#define NSEC_PER_MILLISEC INT64_C(1000000)
|
||||
#define NSEC_PER_MICROSEC INT64_C(1000)
|
||||
|
||||
/* g_get_monotonic_time() does not have enough precision */
|
||||
static inline red_time_t spice_get_monotonic_time_ns(void)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user