WriteFile( tmp_pipe, &Time, sizeof(double), &dwWritten, NULL );
The above is synchronous, if buffer of tmp_pipe is used up, it'll wait there.
tmp_pipe
How to make the above finish instantly, maybe just ignore the data if the buffer is full?