.net - Is Environment.TickCount affected by system time adjustments? -
how i nit bcl property environment Curious as tick is applied. Especially I would like it now if it is affected.
My first estimate was how the property was implemented, it was just a managed cover all around. However, documents of the method indicate that this is affected by the adjustments made by the GetSystemTimeAdjustment function , but there is nothing mentioned about time adjustment in the documentation.
I'm trying to find out what the environment is. Tick can be used while increasing the value of time (though less accurate).
No, system time adjustment is not affected by this was my interpretation of this documentation, but my curiosity demanded hard work, so I had the following code run by adjusting the system:
while (true) {Console.WriteLine (Environment.TickCount); Thread.Sleep (1000); }
... and output showed a complete sequence which was not affected by time adjustment.
Updates
I did a few more homework, which was given in the comment below on Marcus's question. I'm pretty sure that (although can not be confirmed) that the environment Tickcout makes a call in which the following is mentioned in the docs:
The GetTickCount function is limited to resolving the resolution of the system timer, which usually ranges from 10 milliseconds to 16 milliseconds . The adjustments made by the GetSystemTimeAdjustment function are also affected by the resolution of the GetTickCount function.
Therefore, while the system is not affected by changing time, it seems that is affected by the adjustment due to a call.
Comments
Post a Comment