def values_to_deltas(past_values):
    """Turn a deque holding past gauge values into a list of deltas.
    These should be evenly distributed in time.
    """
    deltas = []
    prev_val = None
    for ival, (_, val) in enumerate(past_values):
        if ival > 0:
            deltas.append(val - prev_val)
        prev_val = val
    return deltas
