1explain_time_or_die(3)     Library Functions Manual     explain_time_or_die(3)
2
3
4

NAME

6       explain_time_or_die - get time in seconds and report errors
7

SYNOPSIS

9       #include <libexplain/time.h>
10       time_t explain_time_or_die(time_t *t);
11       time_t explain_time_on_error(time_t *t);
12

DESCRIPTION

14       The  explain_time_or_die  function  is  used to call the time(2) system
15       call. On failure an explanation will be  printed  to  stderr,  obtained
16       from  the  explain_time(3) function, and then the process terminates by
17       calling exit(EXIT_FAILURE).
18
19       The explain_time_on_error function is used to call the  time(2)  system
20       call.  On  failure  an  explanation will be printed to stderr, obtained
21       from the explain_time(3) function, but still returns to the caller.
22
23       t       The t, exactly as to be passed to the time(2) system call.
24

RETURN VALUE

26       The explain_time_or_die function only returns on success,  see  time(2)
27       for  more  information. On failure, prints an explanation and exits, it
28       does not return.
29
30       The explain_time_on_error function always returns the value  return  by
31       the wrapped time(2) system call.
32

EXAMPLE

34       The  explain_time_or_die  function  is intended to be used in a fashion
35       similar to the following example:
36              time_t result = explain_time_or_die(t);
37

SEE ALSO

39       time(2) get time in seconds
40
41       explain_time(3)
42               explain time(2) errors
43
44       exit(2) terminate the calling process
45
47       libexplain version 1.4
48       Copyright (C) 2009 Peter Miller
49
50
51
52                                                        explain_time_or_die(3)
Impressum