Subversion Repositories planix.SVN

Rev

Rev 2 | Details | Compare with Previous | 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
/*
7
 * This is an extension to POSIX
8
 */
9
unsigned int
10
_nap(unsigned int millisecs)
11
{
12
	time_t t0, t1;
13
 
14
	t0 = time(0);
15
	if(_SLEEP(millisecs) < 0){
16
		t1 = time(0);
17
		return t1-t0;
18
	}
19
	return 0;
20
}