Index: uspace/lib/posix/time.c
===================================================================
--- uspace/lib/posix/time.c	(revision a43fbc95e1ad48feea78b9b84ff0be79f1512956)
+++ uspace/lib/posix/time.c	(revision 06cb827d2ff5fb0c1863dfabcf823a5039de5fc7)
@@ -38,4 +38,7 @@
 #include "internal/common.h"
 #include "time.h"
+#include "libc/malloc.h"
+#include <task.h>
+#include <stats.h>
 
 /**
@@ -85,5 +88,5 @@
 	// TODO
 	if (maxsize >= 1) {
-		*s = 0;
+		*s = '\0';
 	}
 	return 0;
@@ -91,11 +94,19 @@
 
 /**
- * 
- * @return
+ * Get CPU time used since the process invocation.
+ *
+ * @return Consumed CPU cycles by this process or -1 if not available.
  */
 posix_clock_t posix_clock(void)
 {
-	// TODO
-	return (posix_clock_t) -1;
+	posix_clock_t total_cycles = -1;
+	stats_task_t *task_stats = stats_get_task(task_get_id());
+	if (task_stats) {
+		total_cycles = (posix_clock_t) (task_stats->kcycles + task_stats->ucycles);
+	}
+	free(task_stats);
+	task_stats = 0;
+
+	return total_cycles;
 }
 
Index: uspace/lib/posix/time.h
===================================================================
--- uspace/lib/posix/time.h	(revision a43fbc95e1ad48feea78b9b84ff0be79f1512956)
+++ uspace/lib/posix/time.h	(revision 06cb827d2ff5fb0c1863dfabcf823a5039de5fc7)
@@ -43,4 +43,7 @@
 #endif
 
+#undef CLOCKS_PER_SEC
+#define CLOCKS_PER_SEC 1000000L
+
 struct posix_tm {
 	int tm_sec;         /* Seconds [0,60]. */
