Click here to Skip to main content
15,888,009 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi,
I wanted to know, is there any way to calculate from how much time computer is started.

Regards.
Posted

1 solution

Generally or in code? You didn't mention any Tag in your question so I give you simple way.

Use the SYSTEMINFO command in DOS. Check the value of System Up Time

For code, search System Up Time(with language C# or VB) in Google

EDIT
----------------------
Retrieving the Operating System Uptime and other things[^]
Retrieve system uptime using C#[^]
 
Share this answer
 
v2
Comments
Mehdi Gholam 6-Nov-11 1:39am    
Simple! 5'ed
RaisKazi 6-Nov-11 3:09am    
Yes it is unclear what aproach OP wants. But based on word "calculate" I too think its programatically. 5ed.
thatraja 6-Nov-11 3:14am    
/*But based on word "calculate" I too think its programatically*/
I could but what's the language? :)
Anyway I'll give him C# solution(he can convert that in VB too). BTW Thanks
RaisKazi 6-Nov-11 3:17am    
Yup, any ways as long as OP gets the idea of SYSTEMINFO, language should not be hurdle. :)
Amir Mahfoozi 6-Nov-11 3:33am    
+5

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900