tehon3299 Posted April 29, 2003 Posted April 29, 2003 What would be the best way to display the uptime of a computer on a webpage? Should I use aspx? Also, is there a way to get the running time of the computer? Thanks! Quote Thanks, Tehon
*Gurus* divil Posted April 29, 2003 *Gurus* Posted April 29, 2003 Check out Environment.TickCount Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
TheExtreme Posted April 29, 2003 Posted April 29, 2003 Both the Server Uptime and the WebSite uptime can be accessed through Microsoft WMI. and is very accurate. Quote
tehon3299 Posted April 29, 2003 Author Posted April 29, 2003 Using the Environment.TickCount, how can I turn the milliseconds into days, hours, minutes?? Quote Thanks, Tehon
Leaders Squirm Posted May 1, 2003 Leaders Posted May 1, 2003 (edited) Perhaps this then? Minutes = Milliseconds \ 60000 Hours = Milliseconds \ 3600000 Days = Milliseconds \ 86400000 Edited May 2, 2003 by Squirm Quote Search the forums | Still IRCing | Be nice
tehon3299 Posted May 1, 2003 Author Posted May 1, 2003 Everything works except for the minutes. Quote Thanks, Tehon
Leaders Squirm Posted May 2, 2003 Leaders Posted May 2, 2003 Yes of course, you will need to use modulo arithmetic: Perhaps this then? Minutes = (Milliseconds \ 60000) Mod 60 Hours = (Milliseconds \ 3600000) Mod 24 Days = Milliseconds \ 86400000 Quote Search the forums | Still IRCing | Be nice
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.