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,
Index: uspace/drv/nic/e1k/e1k.c
===================================================================
--- uspace/drv/nic/e1k/e1k.c	(revision 05882233d8ca97c6879ac5c42456c344c8569d89)
+++ uspace/drv/nic/e1k/e1k.c	(revision bd41ac52cf7d20e9e568c519bf2cb5ac7104b86a)
@@ -327,5 +327,5 @@
 }
 
-static uint16_t e1000_calculate_itr_interval_from_usecs(suseconds_t useconds)
+static uint16_t e1000_calculate_itr_interval_from_usecs(usec_t useconds)
 {
 	return useconds * 4;
@@ -1299,13 +1299,13 @@
 }
 
-/** Calculates ITR register interrupt from timeval structure
+/** Calculates ITR register interrupt from timespec structure
  *
  * @param period Period
  *
  */
-static uint16_t e1000_calculate_itr_interval(const struct timeval *period)
+static uint16_t e1000_calculate_itr_interval(const struct timespec *period)
 {
 	// TODO: use also tv_sec
-	return e1000_calculate_itr_interval_from_usecs(period->tv_usec);
+	return e1000_calculate_itr_interval_from_usecs(NSEC2USEC(period->tv_nsec));
 }
 
@@ -1321,5 +1321,5 @@
  */
 static errno_t e1000_poll_mode_change(nic_t *nic, nic_poll_mode_t mode,
-    const struct timeval *period)
+    const struct timespec *period)
 {
 	assert(nic);
@@ -2182,7 +2182,7 @@
 		goto err_rx_structure;
 
-	struct timeval period;
+	struct timespec period;
 	period.tv_sec = 0;
-	period.tv_usec = E1000_DEFAULT_INTERRUPT_INTERVAL_USEC;
+	period.tv_nsec = USEC2NSEC(E1000_DEFAULT_INTERRUPT_INTERVAL_USEC);
 	rc = nic_report_poll_mode(nic, NIC_POLL_PERIODIC, &period);
 	if (rc != EOK)
Index: uspace/drv/nic/rtl8139/driver.c
===================================================================
--- uspace/drv/nic/rtl8139/driver.c	(revision 05882233d8ca97c6879ac5c42456c344c8569d89)
+++ uspace/drv/nic/rtl8139/driver.c	(revision bd41ac52cf7d20e9e568c519bf2cb5ac7104b86a)
@@ -313,5 +313,5 @@
 
 static errno_t rtl8139_poll_mode_change(nic_t *nic_data, nic_poll_mode_t mode,
-    const struct timeval *period);
+    const struct timespec *period);
 static void rtl8139_poll(nic_t *nic_data);
 
@@ -2068,5 +2068,5 @@
  */
 static errno_t rtl8139_poll_mode_change(nic_t *nic_data, nic_poll_mode_t mode,
-    const struct timeval *period)
+    const struct timespec *period)
 {
 	assert(nic_data);
Index: uspace/drv/nic/rtl8139/general.c
===================================================================
--- uspace/drv/nic/rtl8139/general.c	(revision 05882233d8ca97c6879ac5c42456c344c8569d89)
+++ uspace/drv/nic/rtl8139/general.c	(revision bd41ac52cf7d20e9e568c519bf2cb5ac7104b86a)
@@ -85,5 +85,5 @@
  */
 errno_t rtl8139_timer_act_init(rtl8139_timer_act_t *ta, uint32_t timer_freq,
-    const struct timeval *time)
+    const struct timespec *time)
 {
 	if (!ta || timer_freq == 0 || !time)
@@ -95,11 +95,11 @@
 	ta->full_val = seconds_in_reg * tics_per_ms * 1000;
 
-	struct timeval remains = *time;
+	struct timespec remains = *time;
 	ta->full_skips = remains.tv_sec / seconds_in_reg;
 	remains.tv_sec = remains.tv_sec % seconds_in_reg;
 
-	if (remains.tv_usec > RTL8139_USEC_IN_SEC) {
-		remains.tv_sec += remains.tv_usec / RTL8139_USEC_IN_SEC;
-		remains.tv_usec = remains.tv_usec % RTL8139_USEC_IN_SEC;
+	if (NSEC2USEC(remains.tv_nsec) > RTL8139_USEC_IN_SEC) {
+		remains.tv_sec += NSEC2USEC(remains.tv_nsec) / RTL8139_USEC_IN_SEC;
+		remains.tv_nsec = NSEC2USEC(remains.tv_nsec) % RTL8139_USEC_IN_SEC;
 
 		/* it can be increased above seconds_in_reg again */
@@ -108,5 +108,5 @@
 	}
 
-	ta->last_val = remains.tv_sec * 1000 + remains.tv_usec / 1000;
+	ta->last_val = SEC2MSEC(remains.tv_sec) + NSEC2MSEC(remains.tv_nsec);
 	ta->last_val *= tics_per_ms;
 
Index: uspace/drv/nic/rtl8139/general.h
===================================================================
--- uspace/drv/nic/rtl8139/general.h	(revision 05882233d8ca97c6879ac5c42456c344c8569d89)
+++ uspace/drv/nic/rtl8139/general.h	(revision bd41ac52cf7d20e9e568c519bf2cb5ac7104b86a)
@@ -36,4 +36,5 @@
 
 #include <stddef.h>
+#include <stdint.h>
 #include <time.h>
 
@@ -62,5 +63,5 @@
     size_t);
 extern errno_t rtl8139_timer_act_init(rtl8139_timer_act_t *, uint32_t,
-    const struct timeval *);
+    const struct timespec *);
 extern int rtl8139_timer_act_step(rtl8139_timer_act_t *, uint32_t *);
 
Index: uspace/drv/time/cmos-rtc/cmos-rtc.c
===================================================================
--- uspace/drv/time/cmos-rtc/cmos-rtc.c	(revision 05882233d8ca97c6879ac5c42456c344c8569d89)
+++ uspace/drv/time/cmos-rtc/cmos-rtc.c	(revision bd41ac52cf7d20e9e568c519bf2cb5ac7104b86a)
@@ -75,5 +75,5 @@
 	int clients_connected;
 	/** time at which the system booted */
-	struct timeval boot_time;
+	struct timespec boot_time;
 } rtc_t;
 
@@ -204,5 +204,5 @@
 
 	rtc->boot_time.tv_sec = 0;
-	rtc->boot_time.tv_usec = 0;
+	rtc->boot_time.tv_nsec = 0;
 	rtc->clients_connected = 0;
 
@@ -331,11 +331,11 @@
 		 */
 
-		struct timeval curtime;
+		struct timespec curtime;
 
 		getuptime(&curtime);
-		tv_add(&curtime, &rtc->boot_time);
+		ts_add(&curtime, &rtc->boot_time);
 		fibril_mutex_unlock(&rtc->mutex);
 
-		return time_tv2tm(&curtime, t);
+		return time_ts2tm(&curtime, t);
 	}
 
@@ -346,6 +346,6 @@
 	}
 
-	/* Microseconds are below RTC's resolution, assume 0. */
-	t->tm_usec = 0;
+	/* Nanoseconds are below RTC's resolution, assume 0. */
+	t->tm_nsec = 0;
 
 	/* now read the registers */
@@ -419,10 +419,10 @@
 		result = EINVAL;
 	else {
-		struct timeval uptime;
+		struct timespec uptime;
 
 		getuptime(&uptime);
 		rtc->boot_time.tv_sec = r;
-		rtc->boot_time.tv_usec = t->tm_usec;	/* normalized */
-		tv_sub(&rtc->boot_time, &uptime);
+		rtc->boot_time.tv_nsec = t->tm_nsec;	/* normalized */
+		ts_sub(&rtc->boot_time, &uptime);
 		result = EOK;
 	}
@@ -445,6 +445,6 @@
 	bool bcd_mode;
 	time_t norm_time;
-	struct timeval uptime;
-	struct timeval ntv;
+	struct timespec uptime;
+	struct timespec ntv;
 	int  reg_b;
 	int  reg_a;
@@ -457,8 +457,8 @@
 
 	ntv.tv_sec = norm_time;
-	ntv.tv_usec = t->tm_usec;
+	ntv.tv_nsec = t->tm_nsec;
 	getuptime(&uptime);
 
-	if (tv_gteq(&uptime, &ntv)) {
+	if (ts_gteq(&uptime, &ntv)) {
 		/* This is not acceptable */
 		return EINVAL;
@@ -474,5 +474,5 @@
 	/* boot_time must be recomputed */
 	rtc->boot_time.tv_sec = 0;
-	rtc->boot_time.tv_usec = 0;
+	rtc->boot_time.tv_nsec = 0;
 
 	/* Detect the RTC epoch */
