Re: [Lazarus] Obtaining uptime
Am 06.08.2014 07:50 schrieb Richard Mace richard.m...@gmail.com: Hi, Does anyone know why the following code returns the correct days uptime in XP, but doesn't in Windows 8? (not tested in anything other) Just in case: you know that Windows 8 does not really shutdown by default, but merely suspends to provide a faster user experience? So the result returned by GetTickCount will not be what you might expect. Also on Unix systems it won't work as GetTickCount is linked up with a date/time based function there. Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Obtaining uptime
On Wed, Aug 6, 2014 at 8:49 AM, Richard Mace richard.m...@gmail.com wrote: Does anyone know why the following code returns the correct days uptime in XP, but doesn't in Windows 8? (not tested in anything other) I happened to read this : http://www.extremetech.com/computing/164209-windows-8-banned-by-worlds-top-benchmarking-and-overclocking-site although I guess you are not overclocking. Juha -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Obtaining uptime
Ah, that's interesting. Even if you actually choose Shutdown from the menu? Richard On 6 Aug 2014 07:06, Sven Barth pascaldra...@googlemail.com wrote: Am 06.08.2014 07:50 schrieb Richard Mace richard.m...@gmail.com: Hi, Does anyone know why the following code returns the correct days uptime in XP, but doesn't in Windows 8? (not tested in anything other) Just in case: you know that Windows 8 does not really shutdown by default, but merely suspends to provide a faster user experience? So the result returned by GetTickCount will not be what you might expect. Also on Unix systems it won't work as GetTickCount is linked up with a date/time based function there. Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Obtaining uptime
Am 06.08.2014 11:28 schrieb Richard Mace richard.m...@gmail.com: Ah, that's interesting. Even if you actually choose Shutdown from the menu? Especially then. AFAIK a reboot triggers a full shutdown (with restart of course) and there might also be another possibility for a clean shutdown, but I don't remember that... Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Obtaining uptime
Interesting. I was sure that it was fully shutting down. I'll test the code after a fresh reboot Richard On 6 Aug 2014 10:53, Sven Barth pascaldra...@googlemail.com wrote: Am 06.08.2014 11:28 schrieb Richard Mace richard.m...@gmail.com: Ah, that's interesting. Even if you actually choose Shutdown from the menu? Especially then. AFAIK a reboot triggers a full shutdown (with restart of course) and there might also be another possibility for a clean shutdown, but I don't remember that... Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Obtaining uptime
Hi Sven, I'm amazed! Sure enough, if I choose restart the uptime reads 0 days, and yet, shutdown doesn't actually shut it down! Crazy! Richard On 6 August 2014 10:52, Sven Barth pascaldra...@googlemail.com wrote: Am 06.08.2014 11:28 schrieb Richard Mace richard.m...@gmail.com: Ah, that's interesting. Even if you actually choose Shutdown from the menu? Especially then. AFAIK a reboot triggers a full shutdown (with restart of course) and there might also be another possibility for a clean shutdown, but I don't remember that... Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Obtaining uptime
On 06.08.2014 21:15, Richard Mace wrote: Hi Sven, I'm amazed! Sure enough, if I choose restart the uptime reads 0 days, and yet, shutdown doesn't actually shut it down! Yes, Windows only shuts down the user session till only the bare core of the OS is remaining and then goes to hibernate. This allows for a much faster resume than full shutdown. So they say... ;) Here is a link which explains how to achieve a full shut down: http://www.howtohaven.com/system/how-to-shutdown-windows-8.shtml (after the section title How to Really Shut Down Windows 8) Regards, Sven -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus