1
0
mirror of https://github.com/sgmarz/osblog.git synced 2024-11-28 04:13:31 +04:00
osblog/risc_v/src/userspace/sleepy.cpp

12 lines
213 B
C++
Raw Normal View History

#include <printf.h>
#include <syscall.h>
int main()
{
printf("I'm going to bed.\nYou can watch me sleep for 100 switches using 'top'\n");
for (int i = 0;i < 100;i++) {
syscall_sleep(1000000);
}
return 0;
}