explain_ftime_or_die(3)
π explain_ftime_or_die β the manual, but make it make sense π
okay bestie, welcome to explain_ftime_or_die(3) from the Library Functions Manual. yes it's a mouthful, no we're not skipping any of it. sit down, grab a boba, let's go π§β¨
πΈ NAME πΈ
explain_ftime_or_die β get the date and time, and if it goes wrong, we tell you about it (loudly)
π SYNOPSIS π
#include <libexplain/ftime.h>
void explain_ftime_or_die(struct timeb *tp);
int explain_ftime_on_error(struct timeb *tp);
look at those two little function signatures just vibing π
β¨ DESCRIPTION β¨
so, the explain_ftime_or_die function is the one you call when you want to hit up the ftime(3) system call. if it fails? it prints an explanation to stderr β and that explanation is served fresh by the explain_ftime(3) function β and then the process terminates by calling exit(EXIT_FAILURE). yeah. it does not come back. it's giving main character exits the building πͺπ
meanwhile, the explain_ftime_on_error function is the chill sibling: it also calls the ftime(3) system call, and on failure it also prints an explanation to stderr obtained from explain_ftime(3)... but then it just returns to you like nothing happened. no dramatic exit. π«Ά
tpβ thetp, exactly as to be passed to theftime(3)system call. no notes, no changes, verbatim.
π RETURN VALUE π
- The
explain_ftime_or_diefunction only returns on success β for the full tea, go peek atftime(3). On failure it prints an explanation and exits, which means... it does not return. at all. periodt. - The
explain_ftime_on_errorfunction always returns the value returned by the wrappedftime(3)system call. always. she's reliable like that β
π¦ EXAMPLE π¦
the explain_ftime_or_die function is intended to be used in a fashion similar to the following example:
explain_ftime_or_die(tp);
that's it. that's the whole vibe. iconic honestly π
π SEE ALSO π
ftime(3)β return date and timeexplain_ftime(3)β explainftime(3)errorsexit(2)β terminate the calling process
π COPYRIGHT π
libexplain version 1.4 Copyright (C) 2009 Peter Miller
okay that's the whole page, you read the whole thing, I'm so proud of you ππ this has been explain_ftime_or_die(3) from the Library Functions Manual β libexplain version 1.4, copyright 2009 Peter Miller β stay hydrated, call ftime(3) responsibly, and remember: if it fails, at least it explains itself. no cap. bye bestie πβ¨π¦
π¦ where this page comes from
- debian bookworm: libexplain-dev 1.4.D001-12+b1 Β· LGPL-3.0-or-later
- debian trixie: libexplain-dev 1.4.D001-16 Β· LGPL-3.0-or-later
- ubuntu jammy: libexplain-dev 1.4.D001-12 Β· LGPL-3.0-or-later
- ubuntu noble: libexplain-dev 1.4.D001-13 Β· LGPL-3.0-or-later
- ubuntu resolute: libexplain-dev 1.4.D001-16 Β· LGPL-3.0-or-later
- Copyright (C) 2009, 2011 Peter Miller
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms