def METHOD_NAME(current, previous):
    if not (current and previous):
        return 0
    diff = current - previous
    tty.debug("elapsed = %s - %s = %s" % (current, previous, diff))
    return diff.total_seconds()