From 4dbf2986f133597aaec6fca4e0e825cd2531dc03 Mon Sep 17 00:00:00 2001 From: ray Date: Sat, 12 Jul 2003 02:46:03 +0000 Subject: [PATCH] Don't trust InputEvent.getWhen() on windows any longer. git-svn-id: https://samskivert.googlecode.com/svn/trunk@1168 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- .../src/java/com/samskivert/util/RunAnywhere.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/projects/samskivert/src/java/com/samskivert/util/RunAnywhere.java b/projects/samskivert/src/java/com/samskivert/util/RunAnywhere.java index f30d3dd1..5674408e 100644 --- a/projects/samskivert/src/java/com/samskivert/util/RunAnywhere.java +++ b/projects/samskivert/src/java/com/samskivert/util/RunAnywhere.java @@ -1,5 +1,5 @@ // -// $Id: RunAnywhere.java,v 1.3 2003/05/03 00:12:42 ray Exp $ +// $Id: RunAnywhere.java,v 1.4 2003/07/12 02:46:03 ray Exp $ package com.samskivert.util; @@ -44,10 +44,12 @@ public class RunAnywhere * the Macintosh where it returns {@link System#currentTimeMillis} * because {@link InputEvent#getWhen} returns completely incorrect * values. Hopefully this method will become unnecessary soon. + * We also no longer trust windows, since it seems to misbehave sometimes. */ public static long getWhen (InputEvent event) { - return isMacOS() ? System.currentTimeMillis() : event.getWhen(); + return (isWindows() || isMacOS()) ? System.currentTimeMillis() + : event.getWhen(); } /** Flag indicating that we're on Windows; initialized when this class