aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/time.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/time.h')
-rw-r--r--include/linux/time.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/time.h b/include/linux/time.h
index e15206a7e82e..726976478480 100644
--- a/include/linux/time.h
+++ b/include/linux/time.h
@@ -38,6 +38,8 @@ struct timezone {
38#define NSEC_PER_SEC 1000000000L 38#define NSEC_PER_SEC 1000000000L
39#define FSEC_PER_SEC 1000000000000000L 39#define FSEC_PER_SEC 1000000000000000L
40 40
41#define TIME_T_MAX (time_t)((1UL << ((sizeof(time_t) << 3) - 1)) - 1)
42
41static inline int timespec_equal(const struct timespec *a, 43static inline int timespec_equal(const struct timespec *a,
42 const struct timespec *b) 44 const struct timespec *b)
43{ 45{
@@ -72,6 +74,8 @@ extern unsigned long mktime(const unsigned int year, const unsigned int mon,
72 const unsigned int min, const unsigned int sec); 74 const unsigned int min, const unsigned int sec);
73 75
74extern void set_normalized_timespec(struct timespec *ts, time_t sec, long nsec); 76extern void set_normalized_timespec(struct timespec *ts, time_t sec, long nsec);
77extern struct timespec timespec_add_safe(const struct timespec lhs,
78 const struct timespec rhs);
75 79
76/* 80/*
77 * sub = lhs - rhs, in normalized form 81 * sub = lhs - rhs, in normalized form