17 lines
390 B
C
17 lines
390 B
C
#include "kernel/types.h"
|
|
#include "user/user.h"
|
|
|
|
int main(int argc, char** argv) {
|
|
if (argc != 2) {
|
|
printf("\x1b[31mUnexpected argument\x1b[0m\n");
|
|
printf("usage: sleep <ticks>\n");
|
|
exit(0);
|
|
}
|
|
int ticks = atoi(argv[1]);
|
|
int ret = sleep(ticks);
|
|
if (ret) {
|
|
printf("\x1b[31mFailed to sleep\x1b[0m\n");
|
|
exit(-1);
|
|
}
|
|
exit(0);
|
|
} |