def read_starts_and_deltats(infile):
    """Read ``start`` times and ``deltat`` values from an ``infile``, e.g.
    ``sys.stdin``.

    Returns
    -------

    ``times``   A list of ``(start, deltat)`` tuples, where ``start`` and
                ``deltat`` are times of the format expected by ``get_queries``.

    Arguments
    ---------

    ``infile``  A ``fileobj`` with one space-separated pair of (start, stop)
                times on each line (indicating the time intervals that should
                be downloaded).
    """
    start_stops = [l.split() for l in infile.readlines()]
    return [(int(start), int(stop)-int(start)) for start, stop in start_stops]