1explain_usleep_or_die(3) Library Functions Manual explain_usleep_or_die(3)
2
3
4
6 explain_usleep_or_die - suspend execution for ms intervals and report
7 errors
8
10 #include <libexplain/usleep.h>
11 void explain_usleep_or_die(long long usec);
12 int explain_usleep_on_error(long long usec);
13
15 The explain_usleep_or_die function is used to call the usleep(3) system
16 call. On failure an explanation will be printed to stderr, obtained
17 from the explain_usleep(3) function, and then the process terminates by
18 calling exit(EXIT_FAILURE).
19
20 The explain_usleep_on_error function is used to call the usleep(3) sys‐
21 tem call. On failure an explanation will be printed to stderr, obtained
22 from the explain_usleep(3) function, but still returns to the caller.
23
24 usec The usec, exactly as to be passed to the usleep(3) system call.
25
27 The explain_usleep_or_die function only returns on success, see
28 usleep(3) for more information. On failure, prints an explanation and
29 exits, it does not return.
30
31 The explain_usleep_on_error function always returns the value return by
32 the wrapped usleep(3) system call.
33
35 The explain_usleep_or_die function is intended to be used in a fashion
36 similar to the following example:
37 explain_usleep_or_die(usec);
38
40 usleep(3)
41 suspend execution for microsecond intervals
42
43 explain_usleep(3)
44 explain usleep(3) errors
45
46 exit(2) terminate the calling process
47
49 libexplain version 1.4
50 Copyright (C) 2013 Peter Miller
51
52
53
54 explain_usleep_or_die(3)