MCPcopy Create free account
hub / github.com/MenoData/Time4J / ofSISeconds

Method ofSISeconds

base/src/main/java/net/time4j/MachineTime.java:386–396  ·  view source on GitHub ↗
(double seconds)

Source from the content-addressed store, hash-verified

384 * @since 2.0
385 */
386 public static MachineTime<SI> ofSISeconds(double seconds) {
387
388 if (Double.isInfinite(seconds) || Double.isNaN(seconds)) {
389 throw new IllegalArgumentException("Invalid value: " + seconds);
390 }
391
392 long secs = (long) Math.floor(seconds);
393 int fraction = (int) ((seconds - secs) * MRD);
394 return ofSIUnits(secs, fraction);
395
396 }
397
398 /**
399 * <p>Creates a machine time duration on the UTC scale. </p>

Callers 5

ofSISecondsBigDecimalMethod · 0.95
ofSISecondsDoubleMethod · 0.95
threetenConversionSIMethod · 0.95
multipliedByMethod · 0.95
dividedByMethod · 0.95

Calls 5

ofSIUnitsMethod · 0.95
floorMethod · 0.80
subtractMethod · 0.80
isInfiniteMethod · 0.45
valueOfMethod · 0.45

Tested by 3

ofSISecondsBigDecimalMethod · 0.76
ofSISecondsDoubleMethod · 0.76
threetenConversionSIMethod · 0.76