explain_ftime_or_die(3)

πŸ“¦
version 1.4.D001 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu resolute

πŸ’– 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 β€” the tp, exactly as to be passed to the ftime(3) system call. no notes, no changes, verbatim.

🌈 RETURN VALUE 🌈

  • The explain_ftime_or_die function only returns on success β€” for the full tea, go peek at ftime(3). On failure it prints an explanation and exits, which means... it does not return. at all. periodt.
  • The explain_ftime_on_error function always returns the value returned by the wrapped ftime(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 πŸ‘‘


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