source: rtems/c/src/exec/posix/src/sleep.c @ 64f55e7

4.104.114.84.95
Last change on this file since 64f55e7 was 1c55d2e8, checked in by Joel Sherrill <joel.sherrill@…>, on 11/05/99 at 19:38:37

Split unistd.c file into sysconf.c and sleep.c.

  • Property mode set to 100644
File size: 409 bytes
Line 
1/*
2 *  3.4.3 Delay Process Execution, P1003.1b-1993, p. 81
3 *
4 *  $Id$
5 */
6
7#include <time.h>
8#include <unistd.h>
9
10#include <rtems/system.h>
11
12
13unsigned int sleep(
14  unsigned int seconds
15)
16{
17  /* XXX can we get away with this implementation? */
18  struct timespec tp;
19  struct timespec tm;
20
21  tp.tv_sec = seconds;
22  tp.tv_nsec = 0;
23
24  nanosleep( &tp, &tm );
25
26  return tm.tv_sec;       /* seconds remaining */
27}
Note: See TracBrowser for help on using the repository browser.