Implement timers to flush the buffers