All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.jsonwebtoken.impl.DefaultClock Maven / Gradle / Ivy

There is a newer version: 0.12.6
Show newest version
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();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy