# (chibi time)

#### `(time expr)
(time name expr)`

#### `(tm? obj)
(make-tm tm_sec tm_min tm_hour tm_mday tm_mon tm_year tm_isdst)
(time-second tm)
(time-minute tm)
(time-hour tm)
(time-day tm)
(time-month tm)
(time-year tm)
(time-day-of-week tm)
(time-day-of-year tm)
(time-dst? tm)`

Accessors for the `tm` struct.

#### `(timeval? obj)
(make-timeval tv_sec tv_usec)
(timeval-seconds timeval)
(timeval-microseconds timeval)`

Accessors for the `timeval` struct.

#### `(timezone? obj)
(timezone-offset timezone)
(timezone-dst-time timezone)`

Accessors for the `timezone` struct.

#### `(current-seconds)`

Returns the current time as an integer number of seconds since an arbitrary epoch.

#### `(get-time-of-day)`

Returns the current time as a list of a timeval struct and a timezone.Set the current time from a timeval struct and and optional timezone.

#### `(seconds->time time_t)`

Convert an integer number of epoch seconds to a broken-down tm struct.

#### `(time->seconds tm)`

Convert a tm struct to an integer number of seconds.

#### `(seconds->string time_t)`

Format a datetime string from an integer number of epoch seconds.

#### `(time->string tm)`

Format a datetime string from a tm struct.

#### `(rusage? obj)
(resource-usage-time rusage)
(resource-usage-system-time rusage)
(resource-usage-max-rss rusage)
(const: int resource-usage/self)
(const: int resource-usage/children)
(get-resource-usage int)`