From bafd48d3df9b43a1d49ec015eff30619d595468b Mon Sep 17 00:00:00 2001 From: Aylur Date: Tue, 15 Oct 2024 13:25:45 +0000 Subject: update lua and gjs layout installing the gjs package through meson or npm now results in the same exposed structure lua: fix rockspec docs: aur package --- lang/gjs/src/time.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 lang/gjs/src/time.ts (limited to 'lang/gjs/src/time.ts') diff --git a/lang/gjs/src/time.ts b/lang/gjs/src/time.ts new file mode 100644 index 0000000..a7e1e61 --- /dev/null +++ b/lang/gjs/src/time.ts @@ -0,0 +1,13 @@ +import Astal from "gi://AstalIO" + +export function interval(interval: number, callback?: () => void) { + return Astal.Time.interval(interval, () => void callback?.()) +} + +export function timeout(timeout: number, callback?: () => void) { + return Astal.Time.timeout(timeout, () => void callback?.()) +} + +export function idle(callback?: () => void) { + return Astal.Time.idle(() => void callback?.()) +} -- cgit v1.2.3