Yuari
Documentation
Docs/Timer/Duration.TimeSinceEpoch

Duration.TimeSinceEpoch

Creates a Duration representing the time since the Unix epoch.

Syntax

Duration.TimeSinceEpoch() -> any

Parameters

This function takes no parameters.

Returns

TypeDescription
anyThe value produced by the call.

Description

Duration.TimeSinceEpoch is part of the Timer library. Timer, Stopwatch and Duration objects driven by the VM scheduler.

The operation is performed immediately using the arguments supplied at the call site.

Example

local duration = Duration.TimeSinceEpoch()
print(duration.Seconds)

Notes

  • Timer callbacks run on the executor scheduler; disable or destroy timers when they are finished.