formatting
[AROS.git] / compiler / posixc / sleep.c
blob54f4be184ec775cbe1d36a5296d4f6e806b49a30
1 /*
2 Copyright © 1995-2012, The AROS Development Team. All rights reserved.
3 $Id$
5 POSIX.1-2008 function sleep()
6 */
7 #include <proto/dos.h>
9 /*****************************************************************************
11 NAME */
12 #include <unistd.h>
14 unsigned int sleep (
16 /* SYNOPSIS */
17 unsigned int seconds )
19 /* FUNCTION
20 The sleep() function makes the current process sleep for the
21 specified number of seconds or until a signal arrives which
22 is not ignored.
24 INPUTS
25 seconds - The number of seconds to sleep
27 RESULT
28 Zero if the requested time has elapsed, or the number of seconds
29 left to sleep when the process was signalled.
31 NOTES
33 EXAMPLE
34 // Sleep for 10 seconds
35 sleep( 10 );
37 BUGS
38 The current implementation simply uses the dos.library function
39 Delay() to sleep, and cannot be interrupted by incoming signals.
40 This shouldn't be of any importance, since AROS doesn't have
41 POSIX style signalling yet (but when it is implemented, this
42 function needs to be changed).
44 SEE ALSO
46 INTERNALS
48 ******************************************************************************/
50 Delay( seconds * 50 );
52 return 0;
53 } /* sleep */