Returns the timestamp of the most recent event that had a timestamp, and
that was dispatched from the
EventQueue
associated with the
calling thread.
Returns the timestamp of the most recent event that had a timestamp, and
that was dispatched from the
EventQueue
associated with the
calling thread. If an event with a timestamp is currently being
dispatched, its timestamp will be returned. If no events have yet
been dispatched, the EventQueue's initialization time will be
returned instead.In the current version of
the JDK, only
InputEvent
s,
ActionEvent
s, and
InvocationEvent
s have
timestamps; however, future versions of the JDK may add timestamps to
additional event types. Note that this method should only be invoked
from an application's event dispatching thread. If this method is
invoked from another thread, the current system time (as reported by
System.currentTimeMillis()
) will be returned instead.
Returns:
the timestamp of the last
InputEvent
,
ActionEvent
, or
InvocationEvent
to be
dispatched, or
System.currentTimeMillis()
if this
method is invoked on a thread other than an event dispatching
thread
Since:
1.4
See Also:
InputEvent.getWhen()
,
ActionEvent.getWhen()
,
InvocationEvent.getWhen()
,