Well spotted :-) The reason for the discrepancy is that mIRC is using GetTickCount() to measure system uptime which may or may not return the actual uptime since it uses a relatively low timer resolution ie. the measured time will drift the longer the system is up. It also wraps around to zero every 49.7 days just to keep you on your toes. There are a number of other methods that mIRC could use to measure the real system uptime but they all have their own issues, such as being far slower than GetTickCount() which is used heavily throughout mIRC, or only working on some versions of Windows, or requiring administrator access, and so on. While I could have written a complicated routine that attempts to use several methods of retrieving the real system time, it seemed overkill. Ah the sweet, blissful simplicity of GetTickCount() ;-)

Last edited by Khaled; 05/11/09 10:50 PM.