I need to write all logs in a single file by using a buffer. This buffer can be accessed by different threads and logs can be written, This is protected under a critical section
Sometimes I observed a delay of 1 second in writing the buffer into file (This is observed in time stamp in logs)
How much time taken for fflush to write the data into the files.