File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes getWhen() of ActionEvent Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "getWhen() of ActionEvent" Watch "getWhen() of ActionEvent" New topic

getWhen() of ActionEvent

P Jain
Ranch Hand

Joined: Jul 31, 2004
Posts: 52
What is the unit of time which we get by getWhen() method of ActionEvent.

Regards<br />P Jain
Joe Ess

Joined: Oct 29, 2001
Posts: 9189

Since it's a long it is probably the system time in milliseconds:

public static long currentTimeMillis()

Returns the current time in milliseconds. Note that while the unit of time of the return value is a millisecond, the granularity of the value depends on the underlying operating system and may be larger. For example, many operating systems measure time in units of tens of milliseconds.

See the description of the class Date for a discussion of slight discrepancies that may arise between "computer time" and coordinated universal time (UTC).

the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC.


[How To Ask Questions On JavaRanch]
I agree. Here's the link:
subject: getWhen() of ActionEvent
It's not a secret anymore!