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

com.vicrab.time.Clock Maven / Gradle / Ivy

There is a newer version: 1.2.1
Show newest version
package com.vicrab.time;

import java.util.Date;

/**
 * Clock interface, used to inject a Clock dependency so time can be adjusted in tests.
 */
public interface Clock {

    /**
     * Returns the Clock's time in milliseconds.
     *
     * @return the Clock's time in milliseconds.
     */
    long millis();

    /**
     * Returns the Clock's time as a Date object.
     *
     * @return the Clock's time as a Date object.
     */
    Date date();

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy