io.jsonwebtoken.impl.DefaultClock Maven / Gradle / Ivy
package io.jsonwebtoken.impl;
import io.jsonwebtoken.Clock;
import java.util.Date;
/**
* Default {@link Clock} implementation.
*
* @since 0.7.0
*/
public class DefaultClock implements Clock {
/**
* Default static instance that may be shared. It is thread-safe.
*/
public static final Clock INSTANCE = new DefaultClock();
/**
* Simply returns new {@link Date}()
.
*
* @return a new {@link Date} instance.
*/
@Override
public Date now() {
return new Date();
}
}