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

net.time4j.engine.RealTime Maven / Gradle / Ivy

There is a newer version: 4.38
Show newest version
/*
 * -----------------------------------------------------------------------
 * Copyright © 2013-2016 Meno Hochschild, 
 * -----------------------------------------------------------------------
 * This file (RealTime.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.engine;


/**
 * 

Represents a machine time span in (possibly fractional) seconds only.

* * @param generic type of time unit applicable on time points defined in UTC or POSIX * @author Meno Hochschild * @since 3.23/4.19 */ /*[deutsch] *

Repräsentiert eine Maschinenzeit, die in Sekunden und eventuell Sekundenbruchteilen definiert ist.

* * @param generic type of time unit applicable on time points defined in UTC or POSIX * @author Meno Hochschild * @since 3.23/4.19 */ public interface RealTime extends TimeSpan { //~ Methoden ---------------------------------------------------------- /** *

Yields the normalized seconds of this duration.

* *

The normalization happens in case of a negative duration such that any fraction part * falls into the range {@code 0-999999999}. In this case, following expression is NOT true: * {@code Math.abs(getSeconds()) == getPartialAmount(TimeUnit.SECONDS)}

* * @return long * @see #getFraction() */ /*[deutsch] *

Liefert die normalisierten Sekunden dieser Dauer.

* *

Die Normalisierung geschieht im Fall einer negativen Dauer so, daß ein Sekundenbruchteil * immer in den Bereich {@code 0-999999999} fällt. In diesem Fall ist folgender Ausdruck NICHT * wahr: {@code Math.abs(getSeconds()) == getPartialAmount(TimeUnit.SECONDS)}

* * @return long * @see #getFraction() */ long getSeconds(); /** *

Yields the normalized nanosecond fraction of this duration.

* * @return nanosecond in range {@code 0-999999999} * @see #getSeconds() */ /*[deutsch] *

Liefert den normalisierten Nanosekundenteil dieser Dauer.

* * @return nanosecond in range {@code 0-999999999} * @see #getSeconds() */ int getFraction(); }