]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.runtime/scl/Async.scl
Async utilities for SCL
[simantics/platform.git] / bundles / org.simantics.scl.runtime / scl / Async.scl
index f4b3a92983eb38e8484f8d6e34b0e5c7b22f2d29..1988eb5319eebb2c29ed9fa27e2589c766b56f6b 100644 (file)
@@ -1,3 +1,18 @@
+import "Future"
+
+importJava "java.util.concurrent.TimeUnit" where
+    data TimeUnit
+    NANOSECONDS :: TimeUnit
+    MICROSECONDS :: TimeUnit
+    MILLISECONDS :: TimeUnit
+    SECONDS :: TimeUnit
+    HOURS :: TimeUnit
+    DAYS :: TimeUnit
+
 importJava "org.simantics.scl.runtime.utils.AsyncUtils" where
     runAsync :: (<Proc> a) -> <Proc> ()
     pmap :: (a -> <Proc> b) -> [a] -> <Proc> [b]
+
+    scheduleAtFixedRate :: (<Proc> a) -> Long -> Long -> TimeUnit -> <Proc> Future a
+    scheduleWithFixedDelay :: (<Proc> a) -> Long -> Long -> TimeUnit -> <Proc> Future a
+    schedule :: (<Proc> a) -> Long -> TimeUnit -> <Proc> Future a
\ No newline at end of file