From: Gerrit Renker <gerrit@erg.abdn.ac.uk>
To: dccp@vger.kernel.org
Subject: [PATCH 1/3]: Inline for time delta
Date: Sat, 09 Jun 2007 18:32:15 +0000 [thread overview]
Message-ID: <200706091932.15559@strip-the-willow> (raw)
[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)
{
next reply other threads:[~2007-06-09 18:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-09 18:32 Gerrit Renker [this message]
2007-06-10 5:55 ` [PATCH 1/3]: Inline for time delta 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200706091932.15559@strip-the-willow \
--to=gerrit@erg.abdn.ac.uk \
--cc=dccp@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox