mirror of
https://github.com/cc65/cc65.git
synced 2024-07-09 01:28:58 +00:00
25 lines
316 B
C
25 lines
316 B
C
/*
|
|
* sleep.c
|
|
*
|
|
* Stefan Haubenthal, 2003-06-11
|
|
* Ullrich von Bassewitz, 2003-06-12
|
|
*
|
|
*/
|
|
|
|
|
|
|
|
#include <time.h>
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
unsigned __fastcall__ sleep (unsigned wait)
|
|
{
|
|
clock_t goal = clock () + ((clock_t) wait) * CLOCKS_PER_SEC;
|
|
while ((long) (goal - clock ()) > 0) ;
|
|
return 0;
|
|
}
|
|
|
|
|
|
|