summaryrefslogtreecommitdiff
path: root/user/sleep.c
blob: 961f558397543b3c94dc23083d8c5e18444a021e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include "kernel/types.h"
#include "user/user.h"

int
main(int argc, char* argv[])
{
  uint sec = 0;

  if (argc <= 1) {
    fprintf(2, "usage: sleep [time (ticks)]\n");
    exit(1);
  }
  sec = atoi(argv[1]);

  sleep(sec);

  if (argc <= 2) {
    exit(0);
  }

  exit(0);
}