diff options
Diffstat (limited to 'core/gjs/src/time.ts')
-rw-r--r-- | core/gjs/src/time.ts | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/core/gjs/src/time.ts b/core/gjs/src/time.ts new file mode 100644 index 0000000..4e28ad0 --- /dev/null +++ b/core/gjs/src/time.ts @@ -0,0 +1,13 @@ +import { Astal } from "./imports.js" + +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?.()) +} |