All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3]: Inline for time delta
@ 2007-06-09 18:32 Gerrit Renker
  2007-06-10  5:55 ` Ian McDonald
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Gerrit Renker @ 2007-06-09 18:32 UTC (permalink / raw)
  To: dccp

[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 <gerrit@erg.abdn.ac.uk>
---
 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)
 {

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2007-06-16 15:12 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-09 18:32 [PATCH 1/3]: Inline for time delta Gerrit Renker
2007-06-10  5:55 ` Ian McDonald
2007-06-11  8:18 ` Gerrit Renker
2007-06-11  8:34 ` Ian McDonald
2007-06-16 14:04 ` Arnaldo Carvalho de Melo
2007-06-16 14:44 ` Gerrit Renker
2007-06-16 14:55 ` Arnaldo Carvalho de Melo
2007-06-16 15:00 ` Gerrit Renker
2007-06-16 15:01 ` Arnaldo Carvalho de Melo
2007-06-16 15:12 ` Arnaldo Carvalho de Melo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.