Index: uspace/drv/time/cmos-rtc/cmos-rtc.c
===================================================================
--- uspace/drv/time/cmos-rtc/cmos-rtc.c	(revision 16639bb64953741f4366b570014e0d7df860c6b7)
+++ uspace/drv/time/cmos-rtc/cmos-rtc.c	(revision 83298e89780af59f490c1687839e3ee0dcf6a2d7)
@@ -51,4 +51,5 @@
 #include <macros.h>
 #include <ipc/clock_ctl.h>
+#include <time.h>
 
 #include "cmos-regs.h"
@@ -75,11 +76,4 @@
 	bool removed;
 } rtc_t;
-
-/** Pointer to the kernel shared variables with time */
-struct {
-	volatile sysarg_t seconds1;
-	volatile sysarg_t useconds;
-	volatile sysarg_t seconds2;
-} *kuptime = NULL;
 
 static int  rtc_time_get(ddf_fun_t *fun, struct tm *t);
@@ -650,47 +644,12 @@
 }
 
-/** Get the current uptime
- *
- * The time variables are memory mapped (read-only) from kernel which
- * updates them periodically.
- *
- * As it is impossible to read 2 values atomically, we use a trick:
- * First we read the seconds, then we read the microseconds, then we
- * read the seconds again. If a second elapsed in the meantime, set
- * the microseconds to zero.
- *
- * This assures that the values returned by two subsequent calls
- * to gettimeofday() are monotonous.
- *
- */
 static time_t
 uptime_get(void)
 {
-	if (kuptime == NULL) {
-		uintptr_t faddr;
-		int rc = sysinfo_get_value("clock.faddr", &faddr);
-		if (rc != EOK) {
-			errno = rc;
-			return -1;
-		}
-		
-		void *addr;
-		rc = physmem_map((void *) faddr, 1,
-		    AS_AREA_READ | AS_AREA_CACHEABLE, &addr);
-		if (rc != EOK) {
-			as_area_destroy(addr);
-			errno = rc;
-			return -1;
-		}
-		
-		kuptime = addr;
-	}
-
-	sysarg_t s2 = kuptime->seconds2;
-	
-	read_barrier();
-	sysarg_t s1 = kuptime->seconds1;
-	
-	return max(s1, s2);
+	struct timeval tv;
+
+	getuptime(&tv);
+
+	return tv.tv_sec;
 }
 
