From 4c70f383e0c0273c4092c4efdb414be0966978b7 Mon Sep 17 00:00:00 2001 From: Gerrit Renker Date: Tue, 25 Sep 2007 22:40:13 -0700 Subject: [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 Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller --- net/dccp/options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/dccp/options.c') diff --git a/net/dccp/options.c b/net/dccp/options.c index 167415677a75..a57fcbd7d03c 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 */ -- cgit v1.2.3