summaryrefslogtreecommitdiffstats
path: root/libjava/java/awt/EventQueue.java
diff options
context:
space:
mode:
authorbryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4>2002-08-09 04:26:17 +0000
committerbryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4>2002-08-09 04:26:17 +0000
commit71946bc3b406beb3d1fb9b447204e4236d645c43 (patch)
treecdf9958b411887bead2263ea8ef0bdfc8eae6319 /libjava/java/awt/EventQueue.java
parent0fc014c9ce8232f14be66144bf5a4c08a3e5ffe7 (diff)
downloadppe42-gcc-71946bc3b406beb3d1fb9b447204e4236d645c43.tar.gz
ppe42-gcc-71946bc3b406beb3d1fb9b447204e4236d645c43.zip
AWT/Swing merge from GNU Classpath.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56147 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/awt/EventQueue.java')
-rw-r--r--libjava/java/awt/EventQueue.java25
1 files changed, 24 insertions, 1 deletions
diff --git a/libjava/java/awt/EventQueue.java b/libjava/java/awt/EventQueue.java
index 6696b0c7480..1ce3d163181 100644
--- a/libjava/java/awt/EventQueue.java
+++ b/libjava/java/awt/EventQueue.java
@@ -320,4 +320,27 @@ public class EventQueue
}
}
}
-}
+
+ /**
+ * Returns the timestamp of the most recent event that had a timestamp, or
+ * the initialization time of the event queue if no events have been fired.
+ * At present, only <code>InputEvent</code>s, <code>ActionEvent</code>s,
+ * <code>InputMethodEvent</code>s, and <code>InvocationEvent</code>s have
+ * timestamps, but this may be added to other events in future versions.
+ * If this is called by the event dispatching thread, it can be any
+ * (sequential) value, but to other threads, the safest bet is to return
+ * System.currentTimeMillis().
+ *
+ * @return the most recent timestamp
+ * @see InputEvent#getWhen()
+ * @see ActionEvent#getWhen()
+ * @see InvocationEvent#getWhen()
+ * @see InputMethodEvent#getWhen()
+ * @since 1.4
+ */
+ public static long getMostRecentEventTime()
+ {
+ // XXX For now, this ONLY does the current time.
+ return System.currentTimeMillis();
+ }
+} // class EventQueue
OpenPOWER on IntegriCloud