mirror of
https://github.com/mtan93/SmartThingsPublic.git
synced 2026-03-08 05:31:56 +00:00
fix divide by zero exception
This commit is contained in:
@@ -720,7 +720,7 @@ def completionPercentage() {
|
||||
|
||||
def now = new Date().getTime()
|
||||
def timeElapsed = now - atomicState.start
|
||||
def totalRunTime = totalRunTimeMillis()
|
||||
def totalRunTime = totalRunTimeMillis() ?: 1
|
||||
def percentComplete = timeElapsed / totalRunTime * 100
|
||||
log.debug "percentComplete: ${percentComplete}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user