2 * usleep.c Sleep for the specified number of microseconds
4 * Usage: usleep [ microseconds ]
6 * Copyright 2001 Werner Fink, 2001 SuSE GmbH Nuernberg, Germany.
7 * Copyright 2005 Werner Fink, 2005 SUSE LINUX Products GmbH, Germany.
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * Author: Werner Fink <werner@suse.de>
17 #ifndef __USE_STRING_INLINES
18 # define __USE_STRING_INLINES
20 #ifdef __NO_STRING_INLINES
21 # undef __NO_STRING_INLINES
28 #ifdef _POSIX_PRIORITY_SCHEDULING
31 #define USAGE "Usage:\t%s [ microseconds ]\n", we_are
34 int main(int argc, char **argv)
36 unsigned long int usec = 1;
43 usec = strtoul(argv[1], &endptr, 10);
50 #ifdef _POSIX_PRIORITY_SCHEDULING
56 /* Do this at the end for speed */
58 we_are = basename(argv[0]);
59 fprintf(stderr, USAGE);
61 if (argc > 1 && *(argv[1]) == '-') {
63 if (!strcmp(argv[1], "-help") || *(argv[1]) == 'h' || *(argv[1]) == '?') {
64 fprintf(stderr, "Sleep for the specified number of microseconds.\n\n");
65 fprintf(stderr, "Help options:\n");
66 fprintf(stderr, " -h, -?, --help display this help and exit.\n");