summaryrefslogtreecommitdiff
path: root/scripts/toy.groovy
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2019-06-30 15:31:14 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2019-06-30 15:31:14 +0100
commit03cee47f779f1a9dcadfdfe95916709542f0953a (patch)
tree846adc17905b61a7d1ec77c68cfc3d72fa371e55 /scripts/toy.groovy
parentRefactor basically everything about toys (diff)
downloadtoy-03cee47f779f1a9dcadfdfe95916709542f0953a.zip
pause time can be non-whole seconds
Diffstat (limited to 'scripts/toy.groovy')
-rw-r--r--scripts/toy.groovy4
1 files changed, 2 insertions, 2 deletions
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 {