Index: uspace/app/barber/barber.c
===================================================================
--- uspace/app/barber/barber.c	(revision e2625b1a1e5a2895b86f0e39c2d70a39e49e042a)
+++ uspace/app/barber/barber.c	(revision 8867cf60014e9288ad97cf5fd5d82bcd6e605782)
@@ -130,5 +130,5 @@
 }
 
-static void plan_frame_timer(suseconds_t render_time)
+static void plan_frame_timer(usec_t render_time)
 {
 	/*
@@ -139,5 +139,5 @@
 	 */
 
-	suseconds_t delta = 1000000 / fps;
+	usec_t delta = 1000000 / fps;
 	load_t load = get_load();
 
@@ -190,5 +190,5 @@
 static void frame_timer_callback(void *data)
 {
-	struct timeval prev;
+	struct timespec prev;
 	getuptime(&prev);
 
@@ -199,8 +199,8 @@
 	update_canvas(frame_canvas, frames[frame]);
 
-	struct timeval cur;
+	struct timespec cur;
 	getuptime(&cur);
 
-	plan_frame_timer(tv_sub_diff(&cur, &prev));
+	plan_frame_timer(NSEC2USEC(ts_sub_diff(&cur, &prev)));
 }
 
Index: uspace/app/bdsh/cmds/modules/sleep/sleep.c
===================================================================
--- uspace/app/bdsh/cmds/modules/sleep/sleep.c	(revision e2625b1a1e5a2895b86f0e39c2d70a39e49e042a)
+++ uspace/app/bdsh/cmds/modules/sleep/sleep.c	(revision 8867cf60014e9288ad97cf5fd5d82bcd6e605782)
@@ -57,5 +57,5 @@
 }
 
-/** Convert string containing decimal seconds to useconds_t.
+/** Convert string containing decimal seconds to usec_t.
  *
  * @param nptr   Pointer to string.
@@ -63,9 +63,9 @@
  * @return EOK if conversion was successful.
  */
-static errno_t decimal_to_useconds(const char *nptr, useconds_t *result)
+static errno_t decimal_to_useconds(const char *nptr, usec_t *result)
 {
 	errno_t ret;
-	uint64_t whole_seconds;
-	uint64_t frac_seconds;
+	sec_t whole_seconds;
+	usec_t frac_seconds;
 	const char *endptr;
 
@@ -75,5 +75,5 @@
 		endptr = (char *)nptr;
 	} else {
-		ret = str_uint64_t(nptr, &endptr, 10, false, &whole_seconds);
+		ret = str_int64_t(nptr, &endptr, 10, false, &whole_seconds);
 		if (ret != EOK)
 			return ret;
@@ -87,5 +87,5 @@
 	} else if (*endptr == '.') {
 		nptr = endptr + 1;
-		ret = str_uint64_t(nptr, &endptr, 10, true, &frac_seconds);
+		ret = str_int64_t(nptr, &endptr, 10, true, &frac_seconds);
 		if (ret != EOK)
 			return ret;
@@ -101,6 +101,6 @@
 
 	/* Check for overflow */
-	useconds_t total = whole_seconds * 1000000 + frac_seconds;
-	if (total / 1000000 != whole_seconds)
+	usec_t total = SEC2USEC(whole_seconds) + frac_seconds;
+	if (USEC2SEC(total) != whole_seconds)
 		return EOVERFLOW;
 
@@ -115,5 +115,5 @@
 	errno_t ret;
 	unsigned int argc;
-	useconds_t duration = 0;
+	usec_t duration = 0;
 
 	/* Count the arguments */
Index: uspace/app/bnchmark/bnchmark.c
===================================================================
--- uspace/app/bnchmark/bnchmark.c	(revision e2625b1a1e5a2895b86f0e39c2d70a39e49e042a)
+++ uspace/app/bnchmark/bnchmark.c	(revision 8867cf60014e9288ad97cf5fd5d82bcd6e605782)
@@ -56,12 +56,11 @@
 
 typedef errno_t (*measure_func_t)(void *);
-typedef unsigned long umseconds_t; /* milliseconds */
 
 static void syntax_print(void);
 
-static errno_t measure(measure_func_t fn, void *data, umseconds_t *result)
-{
-	struct timeval start_time;
-	gettimeofday(&start_time, NULL);
+static errno_t measure(measure_func_t fn, void *data, msec_t *result)
+{
+	struct timespec start_time;
+	getuptime(&start_time);
 
 	errno_t rc = fn(data);
@@ -71,10 +70,9 @@
 	}
 
-	struct timeval final_time;
-	gettimeofday(&final_time, NULL);
+	struct timespec final_time;
+	getuptime(&final_time);
 
 	/* Calculate time difference in milliseconds */
-	*result = ((final_time.tv_usec - start_time.tv_usec) / 1000) +
-	    ((final_time.tv_sec - start_time.tv_sec) * 1000);
+	*result = NSEC2USEC(ts_sub_diff(&final_time, &start_time));
 	return EOK;
 }
@@ -133,5 +131,5 @@
 {
 	errno_t rc;
-	umseconds_t milliseconds_taken = 0;
+	msec_t milliseconds_taken = 0;
 	char *path = NULL;
 	measure_func_t fn = NULL;
@@ -194,5 +192,5 @@
 		}
 
-		printf("%s;%s;%s;%lu;ms\n", test_type, path, log_str, milliseconds_taken);
+		printf("%s;%s;%s;%lld;ms\n", test_type, path, log_str, milliseconds_taken);
 	}
 
Index: uspace/app/modplay/modplay.c
===================================================================
--- uspace/app/modplay/modplay.c	(revision e2625b1a1e5a2895b86f0e39c2d70a39e49e042a)
+++ uspace/app/modplay/modplay.c	(revision 8867cf60014e9288ad97cf5fd5d82bcd6e605782)
@@ -75,5 +75,5 @@
 	console_ctrl_t *con;
 	cons_event_t event;
-	suseconds_t timeout;
+	usec_t timeout;
 	pcm_format_t format;
 	void *buffer;
Index: uspace/app/stats/stats.c
===================================================================
--- uspace/app/stats/stats.c	(revision e2625b1a1e5a2895b86f0e39c2d70a39e49e042a)
+++ uspace/app/stats/stats.c	(revision 8867cf60014e9288ad97cf5fd5d82bcd6e605782)
@@ -190,8 +190,8 @@
 static void print_uptime(void)
 {
-	struct timeval uptime;
+	struct timespec uptime;
 	getuptime(&uptime);
 
-	printf("%s: Up %ld days, %ld hours, %ld minutes, %ld seconds\n",
+	printf("%s: Up %lld days, %lld hours, %lld minutes, %lld seconds\n",
 	    NAME, uptime.tv_sec / DAY, (uptime.tv_sec % DAY) / HOUR,
 	    (uptime.tv_sec % HOUR) / MINUTE, uptime.tv_sec % MINUTE);
Index: uspace/app/tester/ipc/ping_pong.c
===================================================================
--- uspace/app/tester/ipc/ping_pong.c	(revision e2625b1a1e5a2895b86f0e39c2d70a39e49e042a)
+++ uspace/app/tester/ipc/ping_pong.c	(revision 8867cf60014e9288ad97cf5fd5d82bcd6e605782)
@@ -29,5 +29,5 @@
 #include <stdio.h>
 #include <stdlib.h>
-#include <sys/time.h>
+#include <time.h>
 #include <ns.h>
 #include <async.h>
@@ -42,13 +42,13 @@
 	TPRINTF("Pinging ns server for %d seconds...", DURATION_SECS);
 
-	struct timeval start;
-	gettimeofday(&start, NULL);
+	struct timespec start;
+	getuptime(&start);
 
 	uint64_t count = 0;
 	while (true) {
-		struct timeval now;
-		gettimeofday(&now, NULL);
+		struct timespec now;
+		getuptime(&now);
 
-		if (tv_sub_diff(&now, &start) >= DURATION_SECS * 1000000L)
+		if (NSEC2SEC(ts_sub_diff(&now, &start)) >= DURATION_SECS)
 			break;
 
Index: uspace/app/tester/ipc/starve.c
===================================================================
--- uspace/app/tester/ipc/starve.c	(revision e2625b1a1e5a2895b86f0e39c2d70a39e49e042a)
+++ uspace/app/tester/ipc/starve.c	(revision 8867cf60014e9288ad97cf5fd5d82bcd6e605782)
@@ -29,5 +29,5 @@
 #include <stdio.h>
 #include <stdlib.h>
-#include <sys/time.h>
+#include <time.h>
 #include <io/console.h>
 #include <async.h>
@@ -43,18 +43,18 @@
 		return "Failed to init connection with console.";
 
-	struct timeval start;
-	gettimeofday(&start, NULL);
+	struct timespec start;
+	getuptime(&start);
 
 	TPRINTF("Intensive computation shall be imagined (for %ds)...\n", DURATION_SECS);
 	TPRINTF("Press a key to terminate prematurely...\n");
 	while (true) {
-		struct timeval now;
-		gettimeofday(&now, NULL);
+		struct timespec now;
+		getuptime(&now);
 
-		if (tv_sub_diff(&now, &start) >= DURATION_SECS * 1000000L)
+		if (NSEC2SEC(ts_sub_diff(&now, &start)) >= DURATION_SECS)
 			break;
 
 		cons_event_t ev;
-		suseconds_t timeout = 0;
+		usec_t timeout = 0;
 		bool has_event = console_get_event_timeout(console, &ev, &timeout);
 		if (has_event && ev.type == CEV_KEY && ev.ev.key.type == KEY_PRESS) {
Index: uspace/app/testread/testread.c
===================================================================
--- uspace/app/testread/testread.c	(revision e2625b1a1e5a2895b86f0e39c2d70a39e49e042a)
+++ uspace/app/testread/testread.c	(revision 8867cf60014e9288ad97cf5fd5d82bcd6e605782)
@@ -126,7 +126,7 @@
 	next_mark = 0;
 	last_mark = 0;
-	struct timeval prev_time;
-	struct timeval start_time;
-	gettimeofday(&start_time, NULL);
+	struct timespec prev_time;
+	struct timespec start_time;
+	getuptime(&start_time);
 	prev_time = start_time;
 
@@ -152,6 +152,6 @@
 
 		if (progress && offset >= next_mark) {
-			struct timeval cur_time;
-			gettimeofday(&cur_time, NULL);
+			struct timespec cur_time;
+			getuptime(&cur_time);
 
 			uint32_t last_run = cur_time.tv_sec - prev_time.tv_sec;
@@ -170,6 +170,6 @@
 	}
 
-	struct timeval final_time;
-	gettimeofday(&final_time, NULL);
+	struct timespec final_time;
+	getuptime(&final_time);
 
 	uint32_t total_run_time = final_time.tv_sec - start_time.tv_sec;
Index: uspace/app/tetris/scores.h
===================================================================
--- uspace/app/tetris/scores.h	(revision e2625b1a1e5a2895b86f0e39c2d70a39e49e042a)
+++ uspace/app/tetris/scores.h	(revision 8867cf60014e9288ad97cf5fd5d82bcd6e605782)
@@ -54,5 +54,5 @@
  */
 
-#include <sys/time.h>
+#include <time.h>
 #include <str.h>
 
Index: uspace/app/tetris/screen.c
===================================================================
--- uspace/app/tetris/screen.c	(revision e2625b1a1e5a2895b86f0e39c2d70a39e49e042a)
+++ uspace/app/tetris/screen.c	(revision 8867cf60014e9288ad97cf5fd5d82bcd6e605782)
@@ -75,5 +75,5 @@
 static const struct shape *lastshape;
 
-static suseconds_t timeleft = 0;
+static usec_t timeleft = 0;
 
 console_ctrl_t *console;
@@ -340,5 +340,5 @@
 void tsleep(void)
 {
-	suseconds_t timeout = fallrate;
+	usec_t timeout = fallrate;
 
 	while (timeout > 0) {
Index: uspace/app/tetris/tetris.c
===================================================================
--- uspace/app/tetris/tetris.c	(revision e2625b1a1e5a2895b86f0e39c2d70a39e49e042a)
+++ uspace/app/tetris/tetris.c	(revision 8867cf60014e9288ad97cf5fd5d82bcd6e605782)
@@ -55,5 +55,5 @@
     "\tThe Regents of the University of California.  All rights reserved.\n";
 
-#include <sys/time.h>
+#include <time.h>
 #include <errno.h>
 #include <stdbool.h>
@@ -170,8 +170,8 @@
 static void srandomdev(void)
 {
-	struct timeval tv;
-
-	gettimeofday(&tv, NULL);
-	srand(tv.tv_sec + tv.tv_usec / 100000);
+	struct timespec ts;
+
+	getrealtime(&ts);
+	srand(ts.tv_sec + ts.tv_nsec / 100000000);
 }
 
Index: uspace/app/top/screen.c
===================================================================
--- uspace/app/top/screen.c	(revision e2625b1a1e5a2895b86f0e39c2d70a39e49e042a)
+++ uspace/app/top/screen.c	(revision 8867cf60014e9288ad97cf5fd5d82bcd6e605782)
@@ -49,7 +49,5 @@
 #include "top.h"
 
-#define USEC_COUNT  1000000
-
-static suseconds_t timeleft = 0;
+static usec_t timeleft = 0;
 
 console_ctrl_t *console;
@@ -57,5 +55,5 @@
 static sysarg_t warning_col = 0;
 static sysarg_t warning_row = 0;
-static suseconds_t warning_timeleft = 0;
+static usec_t warning_timeleft = 0;
 static char *warning_text = NULL;
 
@@ -179,5 +177,5 @@
 static inline void print_global_head(data_t *data)
 {
-	printf("top - %02lu:%02lu:%02lu up "
+	printf("top - %02lld:%02lld:%02lld up "
 	    "%" PRIun " days, %02" PRIun ":%02" PRIun ":%02" PRIun ", "
 	    "load average:",
@@ -527,5 +525,5 @@
 	va_end(args);
 
-	warning_timeleft = 2 * USEC_COUNT;
+	warning_timeleft = SEC2USEC(2);
 
 	screen_moveto(warning_col, warning_row);
@@ -537,5 +535,5 @@
  *
  */
-int tgetchar(unsigned int sec)
+int tgetchar(sec_t sec)
 {
 	/*
@@ -544,5 +542,5 @@
 
 	if (timeleft <= 0)
-		timeleft = sec * USEC_COUNT;
+		timeleft = SEC2USEC(sec);
 
 	/*
Index: uspace/app/top/screen.h
===================================================================
--- uspace/app/top/screen.h	(revision e2625b1a1e5a2895b86f0e39c2d70a39e49e042a)
+++ uspace/app/top/screen.h	(revision 8867cf60014e9288ad97cf5fd5d82bcd6e605782)
@@ -47,5 +47,5 @@
     _HELENOS_PRINTF_ATTRIBUTE(1, 2);
 
-extern int tgetchar(unsigned int);
+extern int tgetchar(sec_t);
 
 #endif
Index: uspace/app/top/top.c
===================================================================
--- uspace/app/top/top.c	(revision e2625b1a1e5a2895b86f0e39c2d70a39e49e042a)
+++ uspace/app/top/top.c	(revision 8867cf60014e9288ad97cf5fd5d82bcd6e605782)
@@ -39,5 +39,5 @@
 #include <stdlib.h>
 #include <task.h>
-#include <sys/time.h>
+#include <time.h>
 #include <errno.h>
 #include <gsort.h>
@@ -154,6 +154,6 @@
 
 	/* Get current time */
-	struct timeval time;
-	gettimeofday(&time, NULL);
+	struct timespec time;
+	getrealtime(&time);
 
 	target->hours = (time.tv_sec % DAY) / HOUR;
@@ -162,5 +162,5 @@
 
 	/* Get uptime */
-	struct timeval uptime;
+	struct timespec uptime;
 	getuptime(&uptime);
 
Index: uspace/app/wavplay/dplay.c
===================================================================
--- uspace/app/wavplay/dplay.c	(revision e2625b1a1e5a2895b86f0e39c2d70a39e49e042a)
+++ uspace/app/wavplay/dplay.c	(revision 8867cf60014e9288ad97cf5fd5d82bcd6e605782)
@@ -42,5 +42,5 @@
 #include <pcm/format.h>
 #include <as.h>
-#include <sys/time.h>
+#include <time.h>
 #include <inttypes.h>
 #include <stdbool.h>
@@ -242,5 +242,6 @@
 
 #define DPRINTF(f, ...) \
-	printf("%.2lu:%.6lu   "f, time.tv_sec % 100, time.tv_usec, __VA_ARGS__)
+	printf("%.2lld:%.6lld   "f, time.tv_sec % 100, \
+	    NSEC2USEC(time.tv_nsec), __VA_ARGS__)
 
 /**
@@ -255,8 +256,8 @@
 	printf("Playing: %dHz, %s, %d channel(s).\n", pb->f.sampling_rate,
 	    pcm_sample_format_str(pb->f.sample_format), pb->f.channels);
-	useconds_t work_time = 50000; /* 50 ms */
+	usec_t work_time = 50000; /* 50 ms */
 	bool started = false;
 	size_t pos = 0;
-	struct timeval time = { 0 };
+	struct timespec time = { 0 };
 	getuptime(&time);
 	while (true) {
@@ -303,11 +304,10 @@
 		}
 		const size_t to_play = buffer_occupied(pb, pos);
-		const useconds_t usecs =
-		    pcm_format_size_to_usec(to_play, &pb->f);
+		const usec_t usecs = pcm_format_size_to_usec(to_play, &pb->f);
 
 		/* Compute delay time */
-		const useconds_t real_delay = (usecs > work_time) ?
+		const usec_t real_delay = (usecs > work_time) ?
 		    usecs - work_time : 0;
-		DPRINTF("POS %zu: %u usecs (%u) to play %zu bytes.\n",
+		DPRINTF("POS %zu: %lld usecs (%lld) to play %zu bytes.\n",
 		    pos, usecs, real_delay, to_play);
 		if (real_delay)
