summaryrefslogtreecommitdiff
path: root/gjs/src/time.ts
diff options
context:
space:
mode:
authorAylur <[email protected]>2024-05-25 14:44:50 +0200
committerAylur <[email protected]>2024-05-25 14:44:50 +0200
commit58fa1ab9be7ee8fd4a8e96865121a54d613978cc (patch)
tree56f01ba49fd2929690a16ac05a4af8f763e6b30b /gjs/src/time.ts
parenta7e25a4a5fcf4de89fe5a149a9aaf50a92be7af1 (diff)
separate node and gjs into its own package
Diffstat (limited to 'gjs/src/time.ts')
-rw-r--r--gjs/src/time.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/gjs/src/time.ts b/gjs/src/time.ts
new file mode 100644
index 0000000..71aa502
--- /dev/null
+++ b/gjs/src/time.ts
@@ -0,0 +1,13 @@
+import Astal from "gi://Astal"
+
+export function interval(interval: number, callback: () => void) {
+ return Astal.Time.interval(interval, callback)
+}
+
+export function timeout(timeout: number, callback: () => void) {
+ return Astal.Time.timeout(timeout, callback)
+}
+
+export function idle(callback: () => void) {
+ return Astal.Time.idle(callback)
+}