On a conference someone told me that DateTime.Now causes IO blocking, something that I have never stopped to consider. If it does, why?
On a conference someone told me that DateTime.Now causes IO blocking, something that I
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Nobody so far has answered where the current time is really coming from. I’m not up to date with the latest PC architecture. But a few years ago, the real-time clock was part of a chip outside of the CPU (south bridge). So to get the time, you had to do some I/O operations with that chip. (It’s not disk access but still an I/O operation.)
And since the current process has to wait for the answer from the clock, it’s blocking I/O.
So that person on the conference was right.