time
luau
local time = require("@std/time")WARNING
These APIs are still open to future evolution. In new major versions, they may change in backwards incompatible ways.
Summary
| Entry | Description |
|---|---|
| Duration | A span of time. |
| Instant | An opaque point in time, used with time.since to measure elapsed time. |
| now | Returns the current point in time as an Instant. |
| since | Returns the number of seconds elapsed since instant. |
Types
Duration
A span of time.
luau
type Duration = duration.DurationInstant
An opaque point in time, used with time.since to measure elapsed time.
luau
type Instant = luteTime.InstantFunctions and Properties
time.now
Returns the current point in time as an Instant.
luau
() -> Instanttime.since
Returns the number of seconds elapsed since instant.
luau
(instant: Instant) -> number