@NotNull private String getLifeTime(@NotNull RunnerMetric lifeTimeMetric) { String lifeTimeValue = lifeTimeMetric.getValue(); if (RunnerMetric.ALWAYS_ON.equals(lifeTimeValue)) { return lifeTimeValue; } if (lifeTimeValue == null) { return TIMER_STUB; } double lifeTime = NUMBER_FORMAT.parse(lifeTimeValue); return StringUtils.timeMlsToHumanReadable((long) lifeTime); }
@NotNull private String getTimeOut(@NotNull RunnerMetric timeoutMetric) { String timeout = timeoutMetric.getValue(); if (RunnerMetric.ALWAYS_ON.equals(timeout)) { return timeout; } if (timeout == null) { return TIMER_STUB; } double terminationTime = NUMBER_FORMAT.parse(timeout); double terminationTimeout = terminationTime - System.currentTimeMillis(); if (terminationTimeout <= 0) { return TIMER_STUB; } return StringUtils.timeMlsToHumanReadable((long) terminationTimeout); }