def round_time(tier, r):
    """Round to r digits all time values of tier."""
    for a in tier:
        loc = a.get_location()
        for l, s in loc:
            b = l.get_begin()
            b.set_midpoint(round(b.get_midpoint(), r))
            e = l.get_end()
            e.set_midpoint(round(e.get_midpoint(), r))
    return tier