mirror of
https://github.com/reactos/reactos.git
synced 2024-10-31 11:56:26 +00:00
385fdfdfeb
svn path=/trunk/; revision=3674
28 lines
629 B
C
28 lines
629 B
C
/* $Id: sleep.c,v 1.3 2002/10/29 04:45:48 rex Exp $
|
|
*/
|
|
/*
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
* PROJECT: ReactOS POSIX+ Subsystem
|
|
* FILE: subsys/psx/lib/psxdll/unistd/sleep.c
|
|
* PURPOSE: Suspend execution for an interval of time
|
|
* PROGRAMMER: KJK::Hyperion <noog@libero.it>
|
|
* UPDATE HISTORY:
|
|
* 14/05/2002: Created
|
|
*/
|
|
|
|
#include <ddk/ntddk.h>
|
|
#include <unistd.h>
|
|
|
|
unsigned int sleep(unsigned int seconds)
|
|
{
|
|
LARGE_INTEGER lnDelay = RtlEnlargedIntegerMultiply(seconds, 10000000);
|
|
|
|
if(!NT_SUCCESS(NtDelayExecution(FALSE, &lnDelay)))
|
|
return seconds;
|
|
|
|
return 0;
|
|
}
|
|
|
|
/* EOF */
|
|
|