Index: uspace/drv/bus/usb/uhci/uhci_rh.c
===================================================================
--- uspace/drv/bus/usb/uhci/uhci_rh.c	(revision 05882233d8ca97c6879ac5c42456c344c8569d89)
+++ uspace/drv/bus/usb/uhci/uhci_rh.c	(revision bd41ac52cf7d20e9e568c519bf2cb5ac7104b86a)
@@ -34,5 +34,5 @@
 #include <macros.h>
 #include <mem.h>
-#include <sys/time.h>
+#include <time.h>
 
 #include <usb/debug.h>
Index: uspace/drv/bus/usb/usbdiag/tests.c
===================================================================
--- uspace/drv/bus/usb/usbdiag/tests.c	(revision 05882233d8ca97c6879ac5c42456c344c8569d89)
+++ uspace/drv/bus/usb/usbdiag/tests.c	(revision bd41ac52cf7d20e9e568c519bf2cb5ac7104b86a)
@@ -72,12 +72,12 @@
 	uint32_t transfer_count = 0;
 
-	struct timeval start_time, final_time, stop_time;
-	gettimeofday(&start_time, NULL);
-	gettimeofday(&stop_time, NULL);
-
-	tv_add_diff(&stop_time, params->min_duration * 1000);
-	gettimeofday(&final_time, NULL);
-
-	while (!tv_gt(&final_time, &stop_time)) {
+	struct timespec start_time, final_time, stop_time;
+	getuptime(&start_time);
+	getuptime(&stop_time);
+
+	ts_add_diff(&stop_time, MSEC2NSEC(params->min_duration));
+	getuptime(&final_time);
+
+	while (!ts_gt(&final_time, &stop_time)) {
 		++transfer_count;
 
@@ -121,9 +121,9 @@
 		}
 
-		gettimeofday(&final_time, NULL);
-	}
-
-	usbdiag_dur_t in_duration = ((final_time.tv_usec - start_time.tv_usec) / 1000) +
-	    ((final_time.tv_sec - start_time.tv_sec) * 1000);
+		getuptime(&final_time);
+	}
+
+	usbdiag_dur_t in_duration = NSEC2MSEC(final_time.tv_nsec - start_time.tv_nsec) +
+	    SEC2MSEC(final_time.tv_sec - start_time.tv_sec);
 
 	usb_log_info("Test on %s IN endpoint completed in %lu ms.", usb_str_transfer_type(pipe->desc.transfer_type), in_duration);
@@ -170,12 +170,12 @@
 	uint32_t transfer_count = 0;
 
-	struct timeval start_time, final_time, stop_time;
-	gettimeofday(&start_time, NULL);
-	gettimeofday(&stop_time, NULL);
-
-	tv_add_diff(&stop_time, params->min_duration * 1000);
-	gettimeofday(&final_time, NULL);
-
-	while (!tv_gt(&final_time, &stop_time)) {
+	struct timespec start_time, final_time, stop_time;
+	getuptime(&start_time);
+	getuptime(&stop_time);
+
+	ts_add_diff(&stop_time, MSEC2NSEC(params->min_duration));
+	getuptime(&final_time);
+
+	while (!ts_gt(&final_time, &stop_time)) {
 		++transfer_count;
 
@@ -186,9 +186,9 @@
 		}
 
-		gettimeofday(&final_time, NULL);
-	}
-
-	usbdiag_dur_t in_duration = ((final_time.tv_usec - start_time.tv_usec) / 1000) +
-	    ((final_time.tv_sec - start_time.tv_sec) * 1000);
+		getuptime(&final_time);
+	}
+
+	usbdiag_dur_t in_duration = NSEC2MSEC(final_time.tv_nsec - start_time.tv_nsec) +
+	    SEC2MSEC(final_time.tv_sec - start_time.tv_sec);
 
 	usb_log_info("Test on %s OUT endpoint completed in %ld ms.", usb_str_transfer_type(pipe->desc.transfer_type), in_duration);
Index: uspace/drv/bus/usb/vhc/hub/hub.c
===================================================================
--- uspace/drv/bus/usb/vhc/hub/hub.c	(revision 05882233d8ca97c6879ac5c42456c344c8569d89)
+++ uspace/drv/bus/usb/vhc/hub/hub.c	(revision bd41ac52cf7d20e9e568c519bf2cb5ac7104b86a)
@@ -64,6 +64,6 @@
 static void clear_port_status_change(hub_port_t *, uint16_t);
 static errno_t set_port_state_delayed_fibril(void *);
-static void set_port_state_delayed(hub_t *, size_t, suseconds_t,
-    hub_port_state_t, hub_port_state_t);
+static void set_port_state_delayed(hub_t *, size_t, usec_t, hub_port_state_t,
+    hub_port_state_t);
 
 /** Convert hub port state to a char. */
@@ -444,5 +444,5 @@
 struct delay_port_state_change {
 	/** Delay in microseconds. */
-	suseconds_t delay;
+	usec_t delay;
 	/** Old state of the port. */
 	hub_port_state_t old_state;
@@ -496,6 +496,6 @@
  */
 static void set_port_state_delayed(hub_t *hub, size_t port_index,
-    suseconds_t delay_time_ms,
-    hub_port_state_t old_state, hub_port_state_t new_state)
+    usec_t delay_time_ms, hub_port_state_t old_state,
+    hub_port_state_t new_state)
 {
 	struct delay_port_state_change *change =
@@ -504,5 +504,5 @@
 	change->hub = hub;
 	change->port = port_index;
-	change->delay = delay_time_ms * 1000;
+	change->delay = MSEC2USEC(delay_time_ms);
 	change->old_state = old_state;
 	change->new_state = new_state;
Index: uspace/drv/bus/usb/xhci/hc.c
===================================================================
--- uspace/drv/bus/usb/xhci/hc.c	(revision 05882233d8ca97c6879ac5c42456c344c8569d89)
+++ uspace/drv/bus/usb/xhci/hc.c	(revision bd41ac52cf7d20e9e568c519bf2cb5ac7104b86a)
@@ -229,7 +229,7 @@
 	hc->max_slots = XHCI_REG_RD(hc->cap_regs, XHCI_CAP_MAX_SLOTS);
 
-	struct timeval tv;
-	getuptime(&tv);
-	hc->wrap_time = tv.tv_sec * 1000000 + tv.tv_usec;
+	struct timespec ts;
+	getuptime(&ts);
+	hc->wrap_time = SEC2USEC(ts.tv_sec) + NSEC2USEC(ts.tv_nsec);
 	hc->wrap_count = 0;
 
@@ -591,9 +591,9 @@
 static errno_t xhci_handle_mfindex_wrap_event(xhci_hc_t *hc, xhci_trb_t *trb)
 {
-	struct timeval tv;
-	getuptime(&tv);
-	usb_log_debug("Microframe index wrapped (@%lu.%li, %" PRIu64 " total).",
-	    tv.tv_sec, tv.tv_usec, hc->wrap_count);
-	hc->wrap_time = ((uint64_t) tv.tv_sec) * 1000000 + ((uint64_t) tv.tv_usec);
+	struct timespec ts;
+	getuptime(&ts);
+	usb_log_debug("Microframe index wrapped (@%lld.%lld, %" PRIu64 " total).",
+	    ts.tv_sec, NSEC2USEC(ts.tv_nsec), hc->wrap_count);
+	hc->wrap_time = SEC2USEC(ts.tv_sec) + NSEC2USEC(ts.tv_nsec);
 	++hc->wrap_count;
 	return EOK;
Index: uspace/drv/bus/usb/xhci/isoch.c
===================================================================
--- uspace/drv/bus/usb/xhci/isoch.c	(revision 05882233d8ca97c6879ac5c42456c344c8569d89)
+++ uspace/drv/bus/usb/xhci/isoch.c	(revision bd41ac52cf7d20e9e568c519bf2cb5ac7104b86a)
@@ -113,5 +113,5 @@
 {
 	xhci_isoch_t *const isoch = ep->isoch;
-	const suseconds_t delay = isoch->buffer_count * ep->interval * 125 +
+	const usec_t delay = isoch->buffer_count * ep->interval * 125 +
 	    RESET_TIMER_DELAY;
 
@@ -210,7 +210,7 @@
 static inline uint64_t get_system_time()
 {
-	struct timeval tv;
-	getuptime(&tv);
-	return ((uint64_t) tv.tv_sec) * 1000000 + ((uint64_t) tv.tv_usec);
+	struct timespec ts;
+	getuptime(&ts);
+	return SEC2USEC(ts.tv_sec) + NSEC2USEC(ts.tv_nsec);
 }
 
@@ -314,5 +314,5 @@
 	while (isoch->transfers[isoch->hw_enqueue].state == ISOCH_FILLED) {
 		xhci_isoch_transfer_t *const it = &isoch->transfers[isoch->hw_enqueue];
-		suseconds_t delay;
+		usec_t delay;
 
 		assert(it->state == ISOCH_FILLED);
@@ -324,5 +324,5 @@
 		case WINDOW_TOO_SOON:
 			delay = wd.offset * 125;
-			usb_log_debug("[isoch] delaying feeding buffer %zu for %ldus",
+			usb_log_debug("[isoch] delaying feeding buffer %zu for %lldus",
 			    it - isoch->transfers, delay);
 			fibril_timer_set_locked(isoch->feeding_timer, delay,
@@ -400,5 +400,5 @@
 	while (isoch->transfers[isoch->enqueue].state <= ISOCH_FILLED) {
 		xhci_isoch_transfer_t *const it = &isoch->transfers[isoch->enqueue];
-		suseconds_t delay;
+		usec_t delay;
 
 		/* IN buffers are "filled" with free space */
@@ -416,5 +416,5 @@
 			/* Not allowed to feed yet. Defer to later. */
 			delay = wd.offset * 125;
-			usb_log_debug("[isoch] delaying feeding buffer %zu for %ldus",
+			usb_log_debug("[isoch] delaying feeding buffer %zu for %lldus",
 			    it - isoch->transfers, delay);
 			fibril_timer_set_locked(isoch->feeding_timer, delay,
