T
- the type parameterpublic class TimedResult<T> extends Object
Modifier and Type | Field and Description |
---|---|
long |
gcMs
The Gc ms.
|
T |
result
The Obj.
|
long |
timeNanos
The Time nanos.
|
Constructor and Description |
---|
TimedResult(T result,
long timeNanos,
long gcMs)
Instantiates a new Timed result.
|
Modifier and Type | Method and Description |
---|---|
double |
gc_seconds()
Gc seconds double.
|
double |
seconds()
Seconds double.
|
static <T> TimedResult<Void> |
time(UncheckedRunnable<T> fn)
Time timed result.
|
static <T> TimedResult<T> |
time(UncheckedSupplier<T> fn)
Time timed result.
|
public final T result
public final long timeNanos
public final long gcMs
public TimedResult(T result, long timeNanos, long gcMs)
result
- the objtimeNanos
- the time nanosgcMs
- the gc mspublic static <T> TimedResult<T> time(@Nonnull UncheckedSupplier<T> fn)
T
- the type parameterfn
- the fnpublic static <T> TimedResult<Void> time(@Nonnull UncheckedRunnable<T> fn)
T
- the type parameterfn
- the fnpublic double seconds()
public double gc_seconds()
Copyright © 2019 SimiaCryptus Software. All rights reserved.