[DCCP]: Inline for time delta
This provides a reusable time difference function which returns the difference
in
microseconds, as often used in the DCCP code.
Signed-off-by: Gerrit Renker <[EMAIL PROTECTED]>
---
net/dccp/dccp.h | 5 +++++
1 file changed, 5 insertions(+)
--- a/net/dccp/dccp.h
+++ b/net/dccp/dccp.h
@@ -421,6 +421,11 @@ static inline suseconds_t timeval_delta(
return secs * USEC_PER_SEC + usecs;
}
+static inline s64 ktime_delta(ktime_t later, ktime_t earlier)
+{
+ return ktime_to_us(ktime_sub(later, earlier));
+}
+
static inline void timeval_add_usecs(struct timeval *tv,
const suseconds_t usecs)
{
-
To unsubscribe from this list: send the line "unsubscribe dccp" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html