X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Ftime.h;h=894ab9259a135a3f7816d74e3475d268ec328b13;hp=8a7dd958ffeeb6b86ef4a1ce1b11cf1c10a6a42b;hb=2a1135fa25ad1fcad3b395e795aa6d41afc90c54;hpb=645a0d9a7c5753b46b2bf239fea98b47729f5b14 diff --git a/src/common/time.h b/src/common/time.h index 8a7dd958f..894ab9259 100644 --- a/src/common/time.h +++ b/src/common/time.h @@ -20,12 +20,22 @@ #define LTTNG_TIME_H #include +#include #define MSEC_PER_SEC 1000ULL #define NSEC_PER_SEC 1000000000ULL #define NSEC_PER_MSEC 1000000ULL #define NSEC_PER_USEC 1000ULL +bool locale_supports_utf8(void); + +#define NSEC_UNIT "ns" +#define USEC_UNIT (locale_supports_utf8() ? "µs" : "us") +#define MSEC_UNIT "ms" +#define SEC_UNIT "s" +#define MIN_UNIT "m" +#define HR_UNIT "h" + /* * timespec_to_ms: Convert timespec to milliseconds. *