Re: [PATCH] usbtest: Use boottime

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello.

On 08/11/2015 06:57 PM, Abhilash Jindal wrote:

Wall time obtained from do_gettimeofday is susceptible to sudden jumps due to
user setting the time or due to NTP.  Boot time is constantly increasing time
better suited for comparing two timestamps.

Signed-off-by: Abhilash Jindal <klock.android@xxxxxxxxx>
---
  drivers/usb/misc/usbtest.c |   15 +++++----------
  1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c
index 0bbafe7..61cc639 100644
--- a/drivers/usb/misc/usbtest.c
+++ b/drivers/usb/misc/usbtest.c
@@ -30,7 +30,7 @@ struct usbtest_param {
  	unsigned		sglen;

  	/* outputs */
-	struct timeval		duration;
+	ktime_t		duration;

  Could you keep the field name aligned to the others?

  };
  #define USBTEST_REQUEST	_IOWR('U', 100, struct usbtest_param)

@@ -2047,7 +2047,7 @@ usbtest_ioctl(struct usb_interface *intf, unsigned int code, void *buf)
  	struct urb		*urb;
  	struct scatterlist	*sg;
  	struct usb_sg_request	req;
-	struct timeval		start;
+	ktime_t		start;

   Likewise.

  	unsigned		i;

  	/* FIXME USBDEVFS_CONNECTINFO doesn't say how fast the device is. */
[...]

MBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux