sleep finished
This commit is contained in:
13
user/sleep.c
13
user/sleep.c
@ -0,0 +1,13 @@
|
||||
#include "kernel/types.h"
|
||||
#include "user/user.h"
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
if (argc != 2) {
|
||||
fprintf(2, "Usage: sleep <time>\n");
|
||||
exit(1);
|
||||
}
|
||||
int time = atoi(argv[1]);
|
||||
// printf("time: %d\n", time);
|
||||
sleep(time);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user