summaryrefslogtreecommitdiff
path: root/src/shared/time-util.h
diff options
context:
space:
mode:
authorRonny Chevalier <chevalier.ronny@gmail.com>2014-10-11 18:45:11 +0200
committerLennart Poettering <lennart@poettering.net>2014-10-21 00:38:30 +0200
commite4746b57387ffaf8be01c177ed4bbf02c8088341 (patch)
tree12d3f25f511a05c381005f5d08a2585071efb0bd /src/shared/time-util.h
parent6dab5bb18151c80fc39bd51f03dcff40b920de3e (diff)
util: avoid duplication of TIME_T_MAX
Diffstat (limited to 'src/shared/time-util.h')
-rw-r--r--src/shared/time-util.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/shared/time-util.h b/src/shared/time-util.h
index 05369d295b..b55a660bb0 100644
--- a/src/shared/time-util.h
+++ b/src/shared/time-util.h
@@ -65,6 +65,8 @@ typedef struct dual_timestamp {
#define FORMAT_TIMESTAMP_RELATIVE_MAX 256
#define FORMAT_TIMESPAN_MAX 64
+#define TIME_T_MAX (time_t)((1UL << ((sizeof(time_t) << 3) - 1)) - 1)
+
#define DUAL_TIMESTAMP_NULL ((struct dual_timestamp) { 0, 0 })
usec_t now(clockid_t clock);