Skip to main content

Timeline for Retrieve system uptime using C#

Current License: CC BY-SA 3.0

9 events
when toggle format what by license comment
Mar 3, 2021 at 11:42 comment added Martin @StevenRands Would you like to post a new answer with Environment.TickCount64? I think this is now the "best" solution.
Mar 2, 2021 at 16:04 comment added Steven Rands No need to use P/Invoke for this in the most recent .NET versions, as the Environment class now has a TickCount64 property.
Mar 11, 2018 at 21:47 comment added wilson0x4d @Rbjz y2k wasn't nearly as eventful as it is made out to be, just as well these APIs aren't built on "assumptions" they are built on "hardware limits"; GetTickCount is a performance API calculated from kernel structures that were 32bit at the time, GetTickCount64 surfaced after those kernel structures supported 64bit values. Might be worth noting that GetTickCount was originally meant to provide time correlation between system performance counters over a short period, a use which was later superceded by QueryPerformanceCounter for higher resolution correlation over a longer period.
May 29, 2017 at 19:54 comment added Robert Cutajar @rkagerer, wait and see. Short sighted assumptions like those took us to y2k and end of epoch time 2038 =D
Nov 22, 2015 at 21:25 comment added rkagerer GetTickCount64 ... does not overflow - It will overflow when they find a way to make my code run for 585 billion years
Feb 25, 2015 at 15:33 comment added Martin @Goby Windows Vista or later? Typo? Renamed “GetTickCount64” to something else?
Feb 24, 2015 at 0:22 comment added Lin Song Yang GetTickCount64() returns error "the System.EntryPointNotFoundException: Unable to find an entry point".
Jul 2, 2013 at 17:15 comment added Tom Anderson This was exactly what I needed, thank you much for posting this :)
May 21, 2013 at 14:50 history answered Martin CC BY-SA 3.0