source: rtems/cpukit/posix/src/sleep.c @ 874297f3

4.104.114.84.95
Last change on this file since 874297f3 was f42b726, checked in by Joel Sherrill <joel.sherrill@…>, on 01/24/01 at 14:17:28

2001-01-24 Ralf Corsepius <corsepiu@…>

  • configure.in: Add src/config.h
  • src/Makefile.am: Add INCLUDES += -I. to pickup config.h
  • src/.cvsignore: Add config.h and stamp-h
  • src/*.c: Add config.h support.
  • Property mode set to 100644
File size: 455 bytes
Line 
1/*
2 *  3.4.3 Delay Process Execution, P1003.1b-1993, p. 81
3 *
4 *  $Id$
5 */
6
7#if HAVE_CONFIG_H
8#include "config.h"
9#endif
10
11#include <time.h>
12#include <unistd.h>
13
14#include <rtems/system.h>
15
16
17unsigned int sleep(
18  unsigned int seconds
19)
20{
21  /* XXX can we get away with this implementation? */
22  struct timespec tp;
23  struct timespec tm;
24
25  tp.tv_sec = seconds;
26  tp.tv_nsec = 0;
27
28  nanosleep( &tp, &tm );
29
30  return tm.tv_sec;       /* seconds remaining */
31}
Note: See TracBrowser for help on using the repository browser.