EMILUA(3em)

πŸ“¦ version 0.12.1, in nixos 26.05, nixpkgs unstable

🌸 NAME 🌸

okay so the name is Emilua β€” Lua execution engine. This is the EMILUA(3em) page from the Emilua reference, and yes bestie, the manual name is literally EMILUA(3em) because we keep it official. ✨

✨ DESCRIPTION ✨

You pull in the clock like this, no cap:

local clock = require('time').high_resolution_clock
local timepoint = clock.now()

This is lowkey the clock with the smallest tick period provided by the system. It's giving tiny-tick-period main character energy πŸ’….

Tip: This clock is useful for microbenchmarking purposes.

πŸ•°οΈ FUNCTIONS πŸ•°οΈ

now() β†’ high_resolution_clock.time_point

Returns a new time point representing the current value of the clock. So you call it and get a fresh little timestamp object β€” slay. 🫢

epoch() β†’ high_resolution_clock.time_point

Returns a new time point representing the epoch of the clock. That's the clock's origin story, periodt. πŸŽ€

πŸŽ€ ATTRIBUTES πŸŽ€

is_steady: boolean

Whether the time between ticks is always constant (i.e. calls to now() return values that increase monotonically even in case of some external clock adjustment). So that's the whole boolean vibe β€” steady or not steady, iykyk. 🌈

πŸ¦‹ time_point PROPERTIES πŸ¦‹

seconds_since_epoch: number

The number of elapsed seconds since the clock's epoch. Simple, iconic, useful. ⭐

πŸ’œ time_point METAMETHODS πŸ’œ

The time_point object also has these metamethods, and yes bestie, we're listing all of them:

  • __sub()
  • __eq()
  • __lt()
  • __le()

xoxo πŸ’– this page is from Emilua 0.12.1-nixpkgs1, dated 1980-01-01, and filed under EMILUA(3em) β€” periodt. 🫢

πŸ“¦ where this page comes from