Introduction
Introduction Statistics Contact Development Disclaimer Help
sleep.c - sbase - suckless unix tools
git clone git://git.suckless.org/sbase
Log
Files
Refs
README
LICENSE
---
sleep.c (392B)
---
1 /* See LICENSE file for copyright and license details. */
2 #include <unistd.h>
3
4 #include "util.h"
5
6 static void
7 usage(void)
8 {
9 eprintf("usage: %s num\n", argv0);
10 }
11
12 int
13 main(int argc, char *argv[])
14 {
15 unsigned seconds;
16
17 ARGBEGIN {
18 default:
19 usage();
20 } ARGEND
21
22 if (argc != 1)
23 usage();
24
25 seconds = estrtonum(argv[0], 0, UINT_MAX);
26 while ((seconds = sleep(seconds)) > 0)
27 ;
28
29 return 0;
30 }
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.