EMILUA(3em)
π NAME π
okay so this is the EMILUA(3em) page from the Emilua reference, and it's about Emilua β Lua execution engine. Today's main character? The system_timer, bestie. π«Άβ¨
πΈ DESCRIPTION πΈ
Here's the opening snippet, literally exactly this:
local timer = require('time').system_timer
local t = timer.new()
This is a timer for the system_clock. It's the same vibe as <https://www.boost.org/doc/libs/1_66_0/doc/html/boost_asio/reference/system_timer.html> in Boost.Asio (the original really does have a stray " after Boost.Asio β keeping the lore intact, iykyk):
A waitable timer is always in one of two states:"expired"or"not expired". If thewait()orasync_wait()function is called on an expired timer, the wait operation will complete immediately. Changing an active waitable timerβs expiry time: changing the expiry time of a timer while there are pending asynchronous waits causes those wait operations to be cancelled.
π¦ FUNCTIONS π¦
β new() β system_timer
local t = system_timer.new()
Constructor. Returns a new system_timer object. Periodt. π
β expires_at(self, tp: time.system_clock.time_point) β integer
This forwards the call to the Boost.Asio expires_at function with the same name at <https://www.boost.org/doc/libs/1_66_0/doc/html/boost_asio/reference/basic_waitable_timer/expires_at.html>:
Set the timerβs expiry time as an absolute time. Any pending asynchronous wait operations will be cancelled. The handler for each cancelled operation will be invoked with the boost::asio::error::operation_aborted error code. Return Value The number of asynchronous operations that were cancelled.
β wait(self)
Initiate a wait operation on the timer and blocks the current fiber until one of these events occurs:
- The timer has expired.
- The timer was cancelled, in which case it raises
boost::asio::error::operation_aborted.
β cancel(self) β integer
Cancel any operations that are waiting on the timer. Returns the number of asynchronous operations that were cancelled. πβ¨
π PROPERTIES π
β¨ expiry: time.system_clock.time_point
The timerβs expiry time as an absolute time.
Whether the timer has expired or not does not affect this value. No cap. π
π«Ά This page is from Emilua 0.12.1-nixpkgs1, dated 1980-01-01, and it's the EMILUA(3em) manual page. Bye bestie, slay responsibly. π
π
π¦ 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