sleep finished

This commit is contained in:
2025-02-21 14:51:15 +08:00
parent 6aa7311ce6
commit 18f6d55004
71 changed files with 1530 additions and 42 deletions

View File

@ -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);
}