1explain_settimeofday_or_die(L3i)brary Functions Manueaxlplain_settimeofday_or_die(3)
2
3
4
6 explain_settimeofday_or_die - sets system time and report errors
7
9 #include <libexplain/settimeofday.h>
10 void explain_settimeofday_or_die(const struct timeval *tv, const struct
11 timezone *tz);
12 int explain_settimeofday_on_error(const struct timeval *tv, const
13 struct timezone *tz);
14
16 The explain_settimeofday_or_die function is used to call the settimeof‐
17 day(2) system call. On failure an explanation will be printed to
18 stderr, obtained from the explain_settimeofday(3) function, and then
19 the process terminates by calling exit(EXIT_FAILURE).
20
21 The explain_settimeofday_on_error function is used to call the settime‐
22 ofday(2) system call. On failure an explanation will be printed to
23 stderr, obtained from the explain_settimeofday(3) function, but still
24 returns to the caller.
25
26 tv The tv, exactly as to be passed to the settimeofday(2) system
27 call.
28
29 tz The tz, exactly as to be passed to the settimeofday(2) system
30 call.
31
33 The explain_settimeofday_or_die function only returns on success, see
34 settimeofday(2) for more information. On failure, prints an explanation
35 and exits, it does not return.
36
37 The explain_settimeofday_on_error function always returns the value
38 return by the wrapped settimeofday(2) system call.
39
41 The explain_settimeofday_or_die function is intended to be used in a
42 fashion similar to the following example:
43 explain_settimeofday_or_die(tv, tz);
44
46 settimeofday(2)
47 sets system time
48
49 explain_settimeofday(3)
50 explain settimeofday(2) errors
51
52 exit(2) terminate the calling process
53
55 libexplain version 1.4
56 Copyright (C) 2013 Peter Miller
57
58
59
60 explain_settimeofday_or_die(3)