diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-12-30 17:22:26 -0500 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-01-02 19:45:47 -0500 |
commit | ccd06097c79218f7d5ea4c21721bbcbc7c467dca (patch) | |
tree | 168bee7d15161c2c1cba3926447162b84c761898 /src/shared/time-util.h | |
parent | ab9001a1e3dc6e60d0cdf53363dc5d18dcc382fd (diff) |
Use format patterns for usec_t, pid_t, nsec_t, usec_t
It is nicer to predefine patterns using configure time check instead of
using casts everywhere.
Since we do not need to use any flags, include "%" in the format instead
of excluding it like PRI* macros.
Diffstat (limited to 'src/shared/time-util.h')
-rw-r--r-- | src/shared/time-util.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/shared/time-util.h b/src/shared/time-util.h index 913821a6bd..96f2ec8fa3 100644 --- a/src/shared/time-util.h +++ b/src/shared/time-util.h @@ -27,6 +27,9 @@ typedef uint64_t usec_t; typedef uint64_t nsec_t; +#define NSEC_FMT "%" PRIu64 +#define USEC_FMT "%" PRIu64 + #include "macro.h" typedef struct dual_timestamp { |