add a timeout to 'flush' waiting data to <pre>