EMILUA(3em)
π NAME π
Emilua β Lua execution engine. This is the EMILUA(3em) page, aka the Emilua reference, and yes bestie weβre getting into clock lore. π«Ά
β¨ DESCRIPTION β¨
Okay so first you grab the steady clock like this:
local clock = require('time').steady_clock
local timepoint = clock.now()
Itβs a monotonic clock β meaning its time points cannot decrease as physical time moves forward. No cap. π°οΈβ¨
πΈ FUNCTIONS πΈ
now() β steady_clock.time_point
Returns a new time point representing the current value of the clock. π
epoch() β steady_clock.time_point
Returns a new time point representing the epoch of the clock. π
π¦ time_point FUNCTIONS π¦
add(self, secs: number)
Modifies the time point by the given duration. β¨
π Note: When the duration is converted to the native tick representation of the clock, itβll be rounded to the nearest time point, rounding to even in halfway cases. That halfway-case-even thing is important, iykyk.
sub(self, secs: number)
Modifies the time point by the given duration. π«Ά
π Note: When the duration is converted to the native tick representation of the clock, itβll be rounded to the nearest time point, rounding to even in halfway cases. Same rounding behavior as above, bestie.
π time_point PROPERTIES π
seconds_since_epoch: number
The number of elapsed seconds since the clockβs epoch. β±οΈ
π time_point METAMETHODS π
These are the metamethods, periodt:
__add()__sub()__eq()__lt()__le()
Thatβs the whole page, bestie. Footer cuteness: Emilua 0.12.1-nixpkgs1, dated 1980-01-01, manual tag EMILUA(3em). Byeeee π
π
π¦ where this page comes from
- nixos 26.05: emilua 0.12.1
- nixpkgs unstable: emilua 0.12.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms