net.time4j.scale.TickProvider Maven / Gradle / Ivy
/*
* -----------------------------------------------------------------------
* Copyright © 2013-2015 Meno Hochschild,
* -----------------------------------------------------------------------
* This file (TickProvider.java) is part of project Time4J.
*
* Time4J is free software: You can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation, either version 2.1 of the License, or
* (at your option) any later version.
*
* Time4J is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Time4J. If not, see .
* -----------------------------------------------------------------------
*/
package net.time4j.scale;
/**
* This SPI-interface describes how nanoseconds since an arbitrary
* start time are generated.
*
* Will be evaluated during loading of the class {@code SystemClock}. The internal standard
* implementation uses {@code System.nanoTime()}.
*
* @author Meno Hochschild
* @doctags.spec All implementations must have a public no-arg constructor.
* @since 3.2/4.1
*/
/*[deutsch]
* Dieses SPI-Interface beschreibt, wie Nanosekunden seit einem
* beliebigen Startzeitpunkt generiert werden.
*
* Wird beim Laden der Klasse {@code net.time4j.SystemClock} ausgewertet. Die
* interne Standardimplementierung basiert auf {@code System.nanoTime()}.
*
* @author Meno Hochschild
* @doctags.spec All implementations must have a public no-arg constructor.
* @since 3.2/4.1
*/
public interface TickProvider {
//~ Methoden ----------------------------------------------------------
/**
* Determines the name of the platform where this implementation should be used.
*
* @return name of suitable platform which is equivalent to the system property "java.vm.name"
* @since 3.2/4.1
*/
/*[deutsch]
* Gibt den Namen der Plattform an wo diese Implementierung genutzt werden darf.
*
* @return name of suitable platform which is equivalent to the system property "java.vm.name"
* @since 3.2/4.1
*/
String getPlatform();
/**
* Generates a count of nanoseconds.
*
* @return count of nanosecond ticks since an arbitrary but fixed start time which is typically the boot time
* @since 3.2/4.1
*/
/*[deutsch]
* Generiert eine Anzahl von Nanosekunden.
*
* @return count of nanosecond ticks since an arbitrary but fixed start time which is typically the boot time
* @since 3.2/4.1
*/
long getNanos();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy