]> pd.if.org Git - pdutils/commitdiff
added sleep implementation
authorNathan Wagner <nw@hydaspes.if.org>
Mon, 13 Apr 2015 07:50:44 +0000 (07:50 +0000)
committerNathan Wagner <nw@hydaspes.if.org>
Thu, 30 Apr 2015 02:28:43 +0000 (02:28 +0000)
utils/sleep/sleep.c [new file with mode: 0644]

diff --git a/utils/sleep/sleep.c b/utils/sleep/sleep.c
new file mode 100644 (file)
index 0000000..bc13a2e
--- /dev/null
@@ -0,0 +1,14 @@
+#include <stdlib.h>
+#include <unistd.h>
+
+int main(int ac, char *av[]) {
+       int t;
+       if (ac < 2) {
+               exit(1);
+       }
+
+       t = atoi(av[1]);
+       sleep(t);
+
+       return 0;
+}