Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247
WebSVN – planix.SVN – Blame – /os/branches/feature_posix/sys/src/ape/lib/ap/plan9/sleep.c – Rev 2

Subversion Repositories planix.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#include "lib.h"
2
#include <unistd.h>
3
#include <time.h>
4
#include "sys9.h"
5
 
6
unsigned int
7
sleep(unsigned int secs)
8
{
9
	time_t t0, t1;
10
 
11
	t0 = time(0);
12
	if(_SLEEP(secs*1000) < 0){
13
		t1 = time(0);
14
		return t1-t0;
15
	}
16
	return 0;
17
}