summaryrefslogtreecommitdiff
path: root/net/dccp/options.c
diff options
context:
space:
mode:
authorGerrit Renker <gerrit@erg.abdn.ac.uk>2007-09-25 22:40:13 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 16:52:35 -0700
commit4c70f383e0c0273c4092c4efdb414be0966978b7 (patch)
tree733cc2497ec68c74d42ed6d8f6978b24152a3de0 /net/dccp/options.c
parentaa97efd97acefb7d3dcd864adb878c7ce34061b3 (diff)
downloadlinux-3.10-4c70f383e0c0273c4092c4efdb414be0966978b7.tar.gz
linux-3.10-4c70f383e0c0273c4092c4efdb414be0966978b7.tar.bz2
linux-3.10-4c70f383e0c0273c4092c4efdb414be0966978b7.zip
[DCCP]: Provide 10s of microsecond timesource
This provides a timesource, conveniently used for DCCP timestamps, which returns the elapsed time in 10s of microseconds since initialisation. This makes for a wrap-around time of about 11.9 hours, which should be sufficient for most applications. Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/options.c')
-rw-r--r--net/dccp/options.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dccp/options.c b/net/dccp/options.c
index 167415677a7..a57fcbd7d03 100644
--- a/net/dccp/options.c
+++ b/net/dccp/options.c
@@ -372,7 +372,7 @@ EXPORT_SYMBOL_GPL(dccp_insert_option_elapsed_time);
int dccp_insert_option_timestamp(struct sock *sk, struct sk_buff *skb)
{
- __be32 now = htonl(((suseconds_t)ktime_to_us(ktime_get_real())) / 10);
+ __be32 now = htonl(dccp_timestamp());
/* yes this will overflow but that is the point as we want a
* 10 usec 32 bit timer which mean it wraps every 11.9 hours */