def cooling_degree_time(t, t_base=23):
    """Calculate cooling degree time at a single time interval.

    Args:
        t: The temperature at a given time interval.
        t_base: The base temperature above which a given time is considered
            to be in cooling mode. This should be in the same units as the input
            temperature. Default is 23 Celcius, which is a common balance point for
            buildings.
    """
    if t > t_base:
        return t - t_base
    else:
        return 0
