EMILUA(3em)
β¨ EMILUA(3em) β Emilua, the Lua execution engine β¨
okay bestie, welcome to the manual page for Emilua β the Lua execution engine β and weβre about to make file-time clocks make sense. π
πΈ NAME πΈ
Emilua β Lua execution engine.
π¦ DESCRIPTION π¦
Start here, bestie:
local clock = require('filesystem').clock
This is a clock for representing file time. Its epoch is unspecified. Thatβs the whole vibe: itβs a clock, it does file-time things, and you should not assume a specific epoch. periodt. π«Ά
β¨ FUNCTIONS β¨
now() β clock.time_point
Hands you a brand-new time point representing the clockβs current value. β°
epoch() β clock.time_point
Hands you a new time point representing the clockβs epoch. π
unix_epoch() β clock.time_point
Hands you a new time point representing 00:00:00 Coordinated Universal Time (UTC), Thursday, 1 January 1970. The classic. π
from_system(tp: time.system_clock.time_point) β clock.time_point
Converts tp into a clock.time_point that represents the same point in time. Same moment, different clock outfit. π
π§ time_point FUNCTIONS π§
add(self, secs: number)
Changes the time point by the given duration.
Note β When that duration gets converted into the clockβs native tick representation, itβll round to the nearest time point, and halfway cases round to even. No cap, that detail matters. π
sub(self, secs: number)
Changes the time point by the given duration.
Note β When that duration gets converted into the clockβs native tick representation, itβll round to the nearest time point, and halfway cases round to even. Same rounding rules, same energy. π
to_system(self) β time.system_clock.time_point
Converts self into a time.system_clock.time_point that represents the same point in time. β¨
π time_point PROPERTIES π
seconds_since_epoch: number
How many seconds have elapsed since the clockβs epoch, as a number. π°οΈ
seconds_since_unix_epoch: number
How many seconds have elapsed since 00:00:00 Coordinated Universal Time (UTC), Thursday, 1 January 1970, as a number. π
π time_point METAMETHODS π
The metamethods this time point supports are:
__add()__sub()__eq()__lt()__le()
mwah π β this page is from Emilua 0.12.1-nixpkgs1, dated 1980-01-01. bye bestie π«Ά
π¦ 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