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

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

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

import java.util.Date;

/**
 * Clock implementation that defers to the system clock. Should be used
 * outside of tests.
 */
public class SystemClock implements Clock {
    @Override
    public long millis() {
        return System.currentTimeMillis();
    }

    @Override
    public Date date() {
        return new Date();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy