Index: kernel/generic/src/proc/thread.c
===================================================================
--- kernel/generic/src/proc/thread.c	(revision 492467587cb8989104cd9a10599a788f06b0a931)
+++ kernel/generic/src/proc/thread.c	(revision 22e6802c4fece061e824ee107b0e2fff8c15e85b)
@@ -501,5 +501,12 @@
 void thread_sleep(uint32_t sec)
 {
-	thread_usleep(sec * 1000000);
+	/* Sleep in 1000 second steps to support
+	   full argument range */
+	while (sec > 0) {
+		uint32_t period = (sec > 1000) ? 1000 : sec;
+	
+		thread_usleep(period * 1000000);
+		sec -= period;
+	}
 }
 
@@ -575,7 +582,7 @@
 {
 	waitq_t wq;
-				  
+	
 	waitq_initialize(&wq);
-
+	
 	(void) waitq_sleep_timeout(&wq, usec, SYNCH_FLAGS_NON_BLOCKING);
 }
@@ -815,5 +822,5 @@
 unative_t sys_thread_usleep(uint32_t usec)
 {
-	thread_usleep(usec);	
+	thread_usleep(usec);
 	return 0;
 }
Index: uspace/lib/libc/generic/time.c
===================================================================
--- uspace/lib/libc/generic/time.c	(revision 492467587cb8989104cd9a10599a788f06b0a931)
+++ uspace/lib/libc/generic/time.c	(revision 22e6802c4fece061e824ee107b0e2fff8c15e85b)
@@ -31,5 +31,5 @@
  */
 /** @file
- */ 
+ */
 
 #include <sys/time.h>
@@ -189,20 +189,20 @@
 
 /** Wait unconditionally for specified number of microseconds */
-int usleep(unsigned long usec)
-{
-	(void) __SYSCALL1(SYS_THREAD_USLEEP, usec);	
+int usleep(useconds_t usec)
+{
+	(void) __SYSCALL1(SYS_THREAD_USLEEP, usec);
 	return 0;
 }
 
 /** Wait unconditionally for specified number of seconds */
-unsigned int sleep(unsigned int seconds)
+unsigned int sleep(unsigned int sec)
 {
 	/* Sleep in 1000 second steps to support
 	   full argument range */
-	while (seconds > 0) {
-		unsigned int period = (seconds > 1000) ? 1000 : seconds;
+	while (sec > 0) {
+		unsigned int period = (sec > 1000) ? 1000 : sec;
 	
 		usleep(period * 1000000);
-		seconds -= period;
+		sec -= period;
 	}
 	return 0;
Index: uspace/lib/libc/include/unistd.h
===================================================================
--- uspace/lib/libc/include/unistd.h	(revision 492467587cb8989104cd9a10599a788f06b0a931)
+++ uspace/lib/libc/include/unistd.h	(revision 22e6802c4fece061e824ee107b0e2fff8c15e85b)
@@ -51,4 +51,6 @@
 #endif
 
+typedef uint32_t useconds_t;
+
 extern int dup2(int oldfd, int newfd);
 
@@ -68,6 +70,6 @@
 
 extern void _exit(int status) __attribute__ ((noreturn));
-extern int usleep(unsigned long usec);
-extern unsigned int sleep(unsigned int seconds);
+extern int usleep(useconds_t uses);
+extern unsigned int sleep(unsigned int se);
 
 #endif
