3 Replies - 205 Views - Last Post: 06 April 2011 - 09:46 PM Rate Topic: -----

#1 sakshamkum  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 19
  • View blog
  • Posts: 232
  • Joined: 09-June 09

detecting startup time

Posted 06 April 2011 - 09:52 AM

Hi,
I am trying to detect when did the user login in the System.
Can we programatically detect when did the System was last turned on
Is This A Good Question/Topic? 0
  • +

Replies To: detecting startup time

#2 sakshamkum  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 19
  • View blog
  • Posts: 232
  • Joined: 09-June 09

Re: detecting startup time

Posted 06 April 2011 - 09:52 AM

Hi,
I am trying to detect when did the user login in the System.
Can we programatically detect when did the System was last turned on
Was This Post Helpful? 0
  • +
  • -

#3 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10440
  • View blog
  • Posts: 38,668
  • Joined: 27-December 08

Re: detecting startup time

Posted 06 April 2011 - 04:59 PM

You can use System.getCurrentTimeMillis() to get the current time, and just log that appropriately. Note that this will work for your Java application only. You cannot make any determinations about the OS or native system.
Was This Post Helpful? 0
  • +
  • -

#4 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8327
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: detecting startup time

Posted 06 April 2011 - 09:46 PM

View Postsakshamkum, on 06 April 2011 - 11:52 AM, said:

Hi,
I am trying to detect when did the user login in the System.
Can we programatically detect when did the System was last turned on

Not with Java
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1