From 03cee47f779f1a9dcadfdfe95916709542f0953a Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 30 Jun 2019 15:31:14 +0100 Subject: pause time can be non-whole seconds --- scripts/toy.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/toy.groovy b/scripts/toy.groovy index 085ec90..4c487e6 100644 --- a/scripts/toy.groovy +++ b/scripts/toy.groovy @@ -138,7 +138,7 @@ return new Object() { }; // This exists because calling .wait(t) in a metaClass method // calls it on the metaClass, not on the original object - void pause(int t) { wait(t); } + void pause(BigDecimal t) { wait(t); } // Events static class Event { @@ -372,7 +372,7 @@ return new Object() { show("${dommeTitle()} ${dommeName()} is away ($away)..."); } if (e && e.event && e.event.time > getTime()) { - wait(e.event.time - getTime()); + pause(e.event.time - getTime()); } } else { -- cgit v1.2.3