Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 163 → Rev 164

/shark/trunk/kernel/nanoslp.c
18,11 → 18,11
 
/**
------------
CVS : $Id: nanoslp.c,v 1.2 2003-01-07 17:07:49 pj Exp $
CVS : $Id: nanoslp.c,v 1.3 2003-05-22 09:32:35 giacomo Exp $
 
File: $File$
Revision: $Revision: 1.2 $
Last update: $Date: 2003-01-07 17:07:49 $
Revision: $Revision: 1.3 $
Last update: $Date: 2003-05-22 09:32:35 $
------------
 
This file contains the nanosleep function (posix 14.2.5) and related
202,4 → 202,13
return t2.tv_sec;
}
 
unsigned int usleep(unsigned int usec)
{
struct timespec t, t2;
 
t.tv_sec = usec / 100000;
t.tv_nsec = usec % 100000 * 1000;
nanosleep(&t, &t2);
 
return t2.tv_sec;
}