Index: uspace/lib/c/generic/time.c
===================================================================
--- uspace/lib/c/generic/time.c	(revision 826a0a97b8e4e1bf926ddd80f683b9a6c3a158b7)
+++ uspace/lib/c/generic/time.c	(revision 0a0dff83ba946738740f60e9a69465f32afd6431)
@@ -51,5 +51,4 @@
 #include <loc.h>
 #include <device/clock_dev.h>
-#include <thread.h>
 
 #define ASCTIME_BUF_LEN  26
@@ -487,5 +486,5 @@
  * @param tv2 Second timeval.
  */
-void tv_add(struct timeval *tv1, struct timeval *tv2)
+void tv_add(struct timeval *tv1, const struct timeval *tv2)
 {
 	tv1->tv_sec += tv2->tv_sec;
@@ -503,5 +502,5 @@
  *
  */
-suseconds_t tv_sub_diff(struct timeval *tv1, struct timeval *tv2)
+suseconds_t tv_sub_diff(const struct timeval *tv1, const struct timeval *tv2)
 {
 	return (tv1->tv_usec - tv2->tv_usec) +
@@ -515,5 +514,5 @@
  *
  */
-void tv_sub(struct timeval *tv1, struct timeval *tv2)
+void tv_sub(struct timeval *tv1, const struct timeval *tv2)
 {
 	tv1->tv_sec -= tv2->tv_sec;
@@ -531,5 +530,5 @@
  *
  */
-int tv_gt(struct timeval *tv1, struct timeval *tv2)
+int tv_gt(const struct timeval *tv1, const struct timeval *tv2)
 {
 	if (tv1->tv_sec > tv2->tv_sec)
@@ -551,5 +550,5 @@
  *
  */
-int tv_gteq(struct timeval *tv1, struct timeval *tv2)
+int tv_gteq(const struct timeval *tv1, const struct timeval *tv2)
 {
 	if (tv1->tv_sec > tv2->tv_sec)
Index: uspace/lib/c/include/sys/time.h
===================================================================
--- uspace/lib/c/include/sys/time.h	(revision 826a0a97b8e4e1bf926ddd80f683b9a6c3a158b7)
+++ uspace/lib/c/include/sys/time.h	(revision 0a0dff83ba946738740f60e9a69465f32afd6431)
@@ -69,4 +69,6 @@
 };
 
+#define TIMEVAL_MAX ((struct timeval) { .tv_sec = LONG_MAX, .tv_usec = 999999 })
+
 struct timezone {
 	int tz_minuteswest;  /* minutes W of Greenwich */
@@ -75,9 +77,9 @@
 
 extern void tv_add_diff(struct timeval *, suseconds_t);
-extern void tv_add(struct timeval *, struct timeval *);
-extern suseconds_t tv_sub_diff(struct timeval *, struct timeval *);
-extern void tv_sub(struct timeval *, struct timeval *);
-extern int tv_gt(struct timeval *, struct timeval *);
-extern int tv_gteq(struct timeval *, struct timeval *);
+extern void tv_add(struct timeval *, const struct timeval *);
+extern suseconds_t tv_sub_diff(const struct timeval *, const struct timeval *);
+extern void tv_sub(struct timeval *, const struct timeval *);
+extern int tv_gt(const struct timeval *, const struct timeval *);
+extern int tv_gteq(const struct timeval *, const struct timeval *);
 extern void gettimeofday(struct timeval *, struct timezone *);
 extern void getuptime(struct timeval *);
