Module time

Module time 

Source
Expand description

Date and time operations

Windjammer’s std::time module maps to these functions.

Structs§

Instant
Instant wrapper for time measurements (re-exported for Windjammer)

Functions§

add_days
Add days to timestamp
add_seconds
Add seconds to timestamp
duration_millis
Calculate duration in milliseconds between two timestamps
duration_secs
Calculate duration in seconds between two timestamps
format
Format timestamp as string
now
Get current instant for time measurements
now_local
Get local date/time as string
now_millis
Get current timestamp (milliseconds since epoch)
now_string
Get current date/time as string (ISO 8601)
parse
Parse ISO 8601 date string
parse_format
Parse date string with custom format
sleep
Sleep for duration (seconds)
sleep_millis
Sleep for duration (milliseconds)
timestamp
Get current timestamp (seconds since epoch)

Type Aliases§

Duration
Re-export Duration type for use in Windjammer code Alias of TimeDelta.