Skip to content

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 ​

EntryDescription
DurationA span of time.
InstantAn opaque point in time, used with time.since to measure elapsed time.
nowReturns the current point in time as an Instant.
sinceReturns the number of seconds elapsed since instant.

Types ​

Duration ​

A span of time.

luau
type Duration = duration.Duration

Instant ​

An opaque point in time, used with time.since to measure elapsed time.

luau
type Instant = luteTime.Instant

Functions and Properties ​

time.now ​

Returns the current point in time as an Instant.

luau
() -> Instant

time.since ​

Returns the number of seconds elapsed since instant.

luau
(instant: Instant) -> number