Check the buffer size and issue a warning if it's too large and
    a warning has not been issued for more than 60 seconds.

def _maybe_warn_about_buffer_size():
    """Check the buffer size and issue a warning if it's too large and
    a warning has not been issued for more than 60 seconds.

    """
    global _last_warning

    if not _last_warning:
        _last_warning = time.time()

    if _buffer_size > _warn_threshold and (time.time() - _last_warning) > 120:
        LOGGER.warning('InfluxDB measurement buffer has %i entries',
                       _buffer_size)