DIFFTIME(3POSIX)

πŸ’– DIFFTIME(3POSIX) πŸ’–

okay bestie, welcome to the POSIX Programmer's Manual ✨ this little page lives in the POSIX Programmer's Manual, and the header says it's DIFFTIME(3POSIX) from the POSIX Programmer's Manual, so you're in the right place 🫢


🌸 PROLOG 🌸

bestie, real talk first: this manual page is part of the POSIX Programmer's Manual. the Linux implementation of this interface may differ (so like, go check the corresponding Linux manual page for the actual Linux tea β˜•), or honestly? the interface may not even be implemented on Linux at all. no cap.


✨ NAME ✨

difftime β€” compute the difference between two calendar time values πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <time.h>

double difftime(time_t time1, time_t time0);

πŸ¦‹ DESCRIPTION πŸ¦‹

so the functionality described on this reference page is aligned with the ISO C standard. if there's any conflict between what's written here and the ISO C standard, that conflict is unintentional, periodt. this volume of POSIX.1‐2017 defers to the ISO C standard, like it's literally bowing to it πŸ‘‘

the difftime() function shall compute the difference between two calendar times (as returned by time()): time1 - time0.

that's it. that's the whole job. subtraction. iconic behavior honestly 🌈


πŸ”₯ RETURN VALUE πŸ”₯

the difftime() function shall return the difference expressed in seconds as a type double. πŸ’–


πŸ’€ ERRORS πŸ’€

no errors are defined. none. zero. the vibes are immaculate, nothing can go wrong here apparently 😭✨

the following sections are informative.


🌸 EXAMPLES 🌸

none. (yes bestie, literally none β€” they left us with nothing πŸ™ˆ)


πŸ’œ APPLICATION USAGE πŸ’œ

none. again. nothing. we're thriving on emptiness πŸŽ€


🧚 RATIONALE 🧚

none. the rationale said "no thoughts, head empty" πŸ’…


⭐ FUTURE DIRECTIONS ⭐

none. the future is a mystery, and this page is not gonna spoil it πŸ¦‹


πŸ‘‘ SEE ALSO πŸ‘‘

  • asctime()
  • clock()
  • ctime()
  • gmtime()
  • localtime()
  • mktime()
  • strftime()
  • strptime()
  • time()
  • utime()

also, the Base Definitions volume of POSIX.1‐2017, <time.h> πŸ’–


okay, legal bestie moment, read it carefully because this part is not a joke πŸ’…

Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html .

Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .


and that's the whole page, bestie 🫢 this was IEEE/The Open Group, 2017, signing off on DIFFTIME(3POSIX) β€” thanks for reading the whole thing, you ate that πŸ’…βœ¨πŸ“