Example usage for javax.management.timer Timer ONE_HOUR

List of usage examples for javax.management.timer Timer ONE_HOUR

Introduction

In this page you can find the example usage for javax.management.timer Timer ONE_HOUR.

Prototype

long ONE_HOUR

To view the source code for javax.management.timer Timer ONE_HOUR.

Click Source Link

Document

Number of milliseconds in one hour.

Usage

From source file:org.wyona.yanel.impl.resources.forgotpw.ForgotPassword.java

/**
 * Check if request is expired/*from   w  ww  .j  a  va  2s . com*/
 */
private boolean isExpired(long starDT, long duration_hour) throws Exception {
    long currentDT = new Date().getTime();
    long expireTime = starDT + duration_hour * Timer.ONE_HOUR;

    return (expireTime < currentDT);
}