summaryrefslogtreecommitdiff
path: root/Userland/sleep.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2018-10-25 13:53:49 +0200
committerAndreas Kling <awesomekling@gmail.com>2018-10-25 13:56:03 +0200
commit597818524277bf24a2d6b10f540cbf2c34c2bb34 (patch)
tree04c49c5219ac2f658681763b3d2b7de1ed1fa7ed /Userland/sleep.cpp
parentc6f2890d8e4620e85d6320a9ed121b640dded80e (diff)
downloadserenity-597818524277bf24a2d6b10f540cbf2c34c2bb34.zip
Add a "sleep" syscall that sleeps for N seconds.
Diffstat (limited to 'Userland/sleep.cpp')
-rw-r--r--Userland/sleep.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/Userland/sleep.cpp b/Userland/sleep.cpp
new file mode 100644
index 0000000000..c0e7c44eea
--- /dev/null
+++ b/Userland/sleep.cpp
@@ -0,0 +1,10 @@
+#include <LibC/unistd.h>
+#include <LibC/stdio.h>
+
+int main(int c, char** v)
+{
+ unsigned secs = 10;
+ sleep(secs);
+ return 0;
+}
+