#include <unistd.h>
extern int32_t sleep(int32_t seconds);
extern int32_t ms_sleep(int32_t milliseconds);
Lets the process sleep for a given amount of seconds (sleep
) or milli seconds (ms_sleep
). The actual time slept can be longer due to larger scheduler intervals (timer interrupts could dictate a time granularity of 10 to 100 milliseconds).
The app sleep exposes this syscall.
Implemented in sys_process.c
as sys_ms_sleep()
.
Overview: syscalls
Process Control Syscalls: fork | execv | exit | kill | ms_sleep | wait | chdir | sbrk