samaaron/at-at — Issue #1: Ability to execute scheduled task early
Author: lnostdal
Created: 2011-11-06 01:00:51+00:00
State: open

```diff --git a/src/overtone/at_at.clj b/src/overtone/at_at.clj
index 69d05db..b839eb3 100644
--- a/src/overtone/at_at.clj
+++ b/src/overtone/at_at.clj
@@ -87,4 +87,6 @@
(let [delay-time (- ms-time (now))]
(if (<= delay-time 0)
(.execute @pool fun)
- (.schedule @pool fun (long delay-time) TimeUnit/MILLISECONDS)))))
+ (let [runnable (.schedule @pool fun
+ (long delay-time) TimeUnit/MILLISECONDS)]
+ #(.execute @pool runnable))))))
```