tmpfile

Defined in header <stdio.h> FILE *tmpfile(); (1) errno_t tmpfile_s(FILE * restrict * restrict streamptr); (2) (since C11) 1) Creates and opens a temporary file. The file is opened as binary file for update (as if by fopen with "wb+ mode). The filename of the file is guaranteed to be unique within the filesystem. At least TMP_MAX files may be opened during the lifetime of a program (this limit may be shared with tmpnam and may be further limited by FOPEN_MAX). 2) Sam

tm

Defined in header <time.h> struct tm; Structure holding a calendar date and time broken down into its components. Member objects int tm_sec seconds after the minute – [0, 61](until C99) / [0, 60] (since C99)[note 1] int tm_min minutes after the hour – [0, 59] int tm_hour hours since midnight – [0, 23] int tm_mday day of the month – [1, 31] int tm_mon months since January – [0, 11] int tm_year years since 1900 int tm_wday days since Sunday – [0,

time_t

Defined in header <time.h> typedef /* unspecified */ time_t; Arithmetic (until C11) Real (since C11) type capable of representing times. Although not defined by the C standard, this is almost always an integral value holding the number of seconds (not counting leap seconds) since 00:00, Jan 1 1970 UTC, corresponding to POSIX time. Notes The standard uses the term calendar time when referring to a value of type time_t. Example Show the start of the epoch. #include &l

timespec_get

Defined in header <time.h> int timespec_get( struct timespec *ts, int base) (since C11) #define TIME_UTC /* implementation-defined */ (since C11) 1) Modifies the timespec object pointed to by ts to hold the current calendar time in the time base base. 2) Expands to a value suitable for use as the base argument of timespec_get Other macro constants beginning with TIME_ may be provided by the implementation to indicate additional time bases. If base is TIME_UTC, then

timespec

Defined in header <time.h> struct timespec; (since C11) Structure holding an interval broken down into seconds and nanoseconds. Member objects time_t tv_sec whole seconds – >= 0 long tv_nsec nanoseconds – [0, 999999999] References C11 standard (ISO/IEC 9899:2011): 7.27.1/3 Components of time (p: 388) See also timespec_get (since C11) returns the calendar time based on a given time base (function) tm calendar time type (struct)

time

Defined in header <time.h> time_t time( time_t *arg ); Returns the current calendar time encoded as a time_t object, and also stores it in the time_t object pointed to by arg (unless arg is a null pointer). Parameters arg - pointer to a time_t object where the time will be stored, or a null pointer Return value Current calendar time encoded as time_t object on success, (time_t)(-1) on error. If arg is not a null pointer, the return value is also stored in the

thread_local

Defined in header <threads.h> #define thread_local _Thread_local (since C11) Convenience macro which can be used to specify that an object has thread-local storage duration. References C11 standard (ISO/IEC 9899:2011): 7.26.1/3 thread_local (p: 376)

Thread support library

If the macro constant __STDC_NO_THREADS__(C11) is defined by the compiler, the header <threads.h> and all of the names listed here are not provided. Threads Defined in header <threads.h> thrd_t implementation-defined complete object type identifying a thread thrd_create (C11) creates a thread (function) thrd_equal (C11) checks if two identifiers refer to the same thread (function) thrd_current (C11) obtains the current thread identifier (function) t

Thread storage duration

An object whose identifier is declared with the storage-class specifier _Thread_local (since C11) has thread storage duration. Its lifetime is the entire execution of the thread for which it is created, and its stored value is initialized when the thread is started. There is a distinct object per thread, and use of the declared name in an expression refers to the object associated with the thread evaluating the expression. The result of attempting to indirectly access an object with thread stor

thrd_yield

Defined in header <threads.h> void thrd_yield(); (since C11) Provides a hint to the implementation to reschedule the execution of threads, allowing other threads to run. Parameters (none). Return value (none). Notes The exact behavior of this function depends on the implementation, in particular on the mechanics of the OS scheduler in use and the state of the system. For example, a first-in-first-out realtime scheduler (SCHED_FIFO in Linux) would suspend the curren