aboutsummaryrefslogtreecommitdiff
path: root/toys/other/usleep.c
diff options
context:
space:
mode:
Diffstat (limited to 'toys/other/usleep.c')
-rw-r--r--toys/other/usleep.c26
1 files changed, 11 insertions, 15 deletions
diff --git a/toys/other/usleep.c b/toys/other/usleep.c
index ff7fe88b..6040cc06 100644
--- a/toys/other/usleep.c
+++ b/toys/other/usleep.c
@@ -1,30 +1,26 @@
-/* vi: set sw=4 ts=4:
- *
- * usleep.c - Wait for a number of microseconds.
+/* usleep.c - Wait for a number of microseconds.
*
* Copyright 2012 Elie De Brauwer <eliedebrauwer@gmail.com>
USE_USLEEP(NEWTOY(usleep, "<1", TOYFLAG_BIN))
config USLEEP
- bool "usleep"
- default y
- help
- usage: usleep MICROSECONDS
-
- Pause for MICROSECONDS microseconds.
+ bool "usleep"
+ default y
+ help
+ usage: usleep MICROSECONDS
+ Pause for MICROSECONDS microseconds.
*/
#include "toys.h"
void usleep_main(void)
{
- struct timespec tv;
- long delay = atol(*toys.optargs);
-
- tv.tv_sec = delay/1000000;
- tv.tv_nsec = (delay%1000000) * 1000;
- toys.exitval = !!nanosleep(&tv, NULL);
+ struct timespec tv;
+ long delay = atol(*toys.optargs);
+ tv.tv_sec = delay/1000000;
+ tv.tv_nsec = (delay%1000000) * 1000;
+ toys.exitval = !!nanosleep(&tv, NULL);
}