BuildCache
Typedefs | Functions
bcache::time Namespace Reference

Portable file time types and functions. More...

Typedefs

using seconds_t = int64_t
 Time in seconds since the Unix epoch. More...
 

Functions

seconds_t seconds_since_epoch ()
 Get the current time in seconds. More...
 

Detailed Description

Portable file time types and functions.

Typedef Documentation

◆ seconds_t

using bcache::time::seconds_t = typedef int64_t

Time in seconds since the Unix epoch.

Integer number of seconds since the Unix epoch, i.e. 00:00:00 UTC on 1 January 1970. The value is represented with 64 bits (so we're good wrt the 2038 problem).

Function Documentation

◆ seconds_since_epoch()

seconds_t bcache::time::seconds_since_epoch ( )

Get the current time in seconds.

Time values returned by this function are compatible with file system time values.

Returns
the number of seconds since the Unix epoch.