< prev index next >
test/jdk/java/awt/event/KeyEvent/CorrectTime/CorrectTime.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 120,130 ****
private void traceKey(String k, KeyEvent e){
long eventTime = e.getWhen();
long currTime = System.currentTimeMillis();
long diff = currTime - eventTime;
! Sysout.println(k + " diff is " + diff + ", event is "+ e);
if (diff < 0 ||
diff > REASONABLE_PATH_TIME)
{
AbstractTest.fail(k + " diff is " + diff + ", event = "+e);
}
--- 120,130 ----
private void traceKey(String k, KeyEvent e){
long eventTime = e.getWhen();
long currTime = System.currentTimeMillis();
long diff = currTime - eventTime;
! System.out.println(k + " diff is " + diff + ", event is "+ e);
if (diff < 0 ||
diff > REASONABLE_PATH_TIME)
{
AbstractTest.fail(k + " diff is " + diff + ", event = "+e);
}
< prev index next >