projects
/
smartthings-infrastructure.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d09f937
)
Fixing a minor bug in schedule method!
author
amiraj
<amiraj.95@uci.edu>
Thu, 1 Aug 2019 22:56:32 +0000
(15:56 -0700)
committer
amiraj
<amiraj.95@uci.edu>
Thu, 1 Aug 2019 22:56:32 +0000
(15:56 -0700)
Methods/schedule.groovy
patch
|
blob
|
history
diff --git
a/Methods/schedule.groovy
b/Methods/schedule.groovy
index 6089a06ac3021c4b0add77c8b29d396bde3e87ff..fac8d952cecfc82dc001b519d9bc74dedcf045df 100644
(file)
--- a/
Methods/schedule.groovy
+++ b/
Methods/schedule.groovy
@@
-16,8
+16,8
@@
def schedule(String time, String nameOfFunction) {
// delay = inputTime-currentTime
//}
// delay = inputTime-currentTime
//}
-
//
timersFuncList.add(nameOfFunction)
-
//
timersList.add(new SimulatedTimer())
+ timersFuncList.add(nameOfFunction)
+ timersList.add(new SimulatedTimer())
def task = timersList[timersFuncList.indexOf(nameOfFunction)].runAfter(/*delay*1000*0*/0) {
"$nameOfFunction"()
}
def task = timersList[timersFuncList.indexOf(nameOfFunction)].runAfter(/*delay*1000*0*/0) {
"$nameOfFunction"()
}
@@
-26,7
+26,7
@@
def schedule(String time, String nameOfFunction) {
def schedule(String time, Closure nameOfFunction) {
//def _inputTime = time.split(':')
//Date date = new Date()
def schedule(String time, Closure nameOfFunction) {
//def _inputTime = time.split(':')
//Date date = new Date()
- def _currentTime = date.format("HH:mm:ss").split(':')
+
//
def _currentTime = date.format("HH:mm:ss").split(':')
//Convert input time and current time to minutes
//def inputTime = Integer.parseInt(_inputTime[0])*3600+Integer.parseInt(_inputTime[1])*60
//Convert input time and current time to minutes
//def inputTime = Integer.parseInt(_inputTime[0])*3600+Integer.parseInt(_inputTime[1])*60