__TIME__
__TIME__ is a predefined C macro that expands to a string literal specifying the time of translation.
Modern C, Third Edition
__TIME__ is a predefined C macro that expands to a string literal containing the time of translation.
- How it is used
- Provides translation-time information for diagnostic output and invocation-context traces.
- How deep it goes
- Defines the expansion as a string literal containing translation time but does not specify its representation or formatting.
- Examples
- Uses diagnostic output and contrasts translation-time macros with runtime interfaces such as time and difftime.
- What you can do after
- Apply __TIME__ in diagnostic output while recognizing that it records translation context rather than runtime time.
Modern C
__TIME__ is a predefined C macro that expands to a string literal containing the time of compilation.
- How it is used
- Distinguishes compile-time identification from runtime calendar-time operations.
- How deep it goes
- Defines the expansion result and compilation-time meaning without detailing preprocessing mechanics or formatting rules.
- What you can do after
- Evaluate whether a timestamp represents compilation time or runtime calendar time.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

