code: @Override
  	public Long getValue() {
  		final JobStatus status = eg.getState();
  
  		if (status == JobStatus.RUNNING) {
  			// running right now - report the uptime
  			final long runningTimestamp = eg.getStatusTimestamp(JobStatus.RUNNING);
  			// we use 'Math.max' here to avoid negative timestamps when clocks change
  			return Math.max(System.currentTimeMillis() - runningTimestamp, 0);
  		}
  		else if (status.isTerminalState()) {
  			// not running any more -> finished or not on leader
  			return NO_LONGER_RUNNING;
  		}
  		else {
  			// not yet running or not up at the moment
  			return 0L;
  		}
  	}
docs: ------------------------------------------------------------------------