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

io.hyperfoil.tools.horreum.svc.TimeService Maven / Gradle / Ivy

The newest version!
package io.hyperfoil.tools.horreum.svc;

import java.time.Instant;

import jakarta.enterprise.context.ApplicationScoped;

/**
 * {@link java.time.Instant#now()} cannot be mocked in JDK17 so we need to use a mockable service.
 */
@ApplicationScoped
public class TimeService {
    public Instant now() {
        return Instant.now();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy