diff options
author | David Howells <dhowells@redhat.com> | 2016-09-22 00:29:01 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2016-09-22 08:21:24 +0100 |
commit | 77f2efcbdd7133466060198e02c6e8a170c3cd14 (patch) | |
tree | 85097901709212a25e9f5334922f0333171f87c5 /include/linux/ktime.h | |
parent | 7aa51da7c88d42cc0bb85ab7d01429fbd4e51282 (diff) |
rxrpc: Add ktime_sub_ms()
Add a ktime_sub_ms() to go with ktime_add_ms() and co. for use in AF_RXRPC
RTT determination.
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'include/linux/ktime.h')
-rw-r--r-- | include/linux/ktime.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/ktime.h b/include/linux/ktime.h index 2b6a204bd8d4..aa118bad1407 100644 --- a/include/linux/ktime.h +++ b/include/linux/ktime.h @@ -231,6 +231,11 @@ static inline ktime_t ktime_sub_us(const ktime_t kt, const u64 usec) return ktime_sub_ns(kt, usec * NSEC_PER_USEC); } +static inline ktime_t ktime_sub_ms(const ktime_t kt, const u64 msec) +{ + return ktime_sub_ns(kt, msec * NSEC_PER_MSEC); +} + extern ktime_t ktime_add_safe(const ktime_t lhs, const ktime_t rhs); /** |