Time#

Time related functions

Info

To use declarations from this page, include the <essence/time.hpp> header.

u64 seconds_since_epoch() noexcept#

Get the number of seconds elapsed since the Unix Epoch.

std::string readable_timestamp()#

Get a readable timestamp in the format of: <year>-<month>-<day> <12-based hour>:<minute>:<second> <AM/PM>

Example

io::printn("INFO [{}]: an informational message", readable_timestamp());
// prints:
// "INFO [2026-06-24 01:04:59 PM]: an informational message"