'How much more time before the next action.'

def get_progress(self):

    if (self.lastAction is None):
        return 0
    next = mktime(parse_timestamp(self.lastAction))
    start = mktime(parse_timestamp(self.startTime))
    end = mktime(parse_timestamp(self.endTime))
    if (end != start):
        progress = min(int(((1 - ((end - next) / (end - start))) * 100)), 100)
    else:
        progress = 100
    return progress
