public class TimeProfiler extends java.lang.Object implements ComparableProfiler
Modifier and Type | Class and Description |
---|---|
static class |
TimeProfiler.TimeBase
The time base.
|
Constructor and Description |
---|
TimeProfiler() |
Modifier and Type | Method and Description |
---|---|
long |
compare(long start,
long end)
Compare two values, the value returned will then be used by
Profiler.printValue(long) . |
static TimeProfiler.TimeBase |
getBase()
Gets the
TimeProfiler.TimeBase for the printValue(long) . |
long |
getCurrentValue()
Gets the current value.
|
java.lang.String |
getName()
Gets the profiler's name.
|
boolean |
isBiggerPrinted(long v1,
long v2)
Checks whether a value will appear bigger than another once printed.
|
java.lang.String |
printValue(long value)
Prints a value with its unit.
|
static void |
setBase(TimeProfiler.TimeBase base)
Sets the
TimeProfiler.TimeBase for the printValue(long) . |
public static TimeProfiler.TimeBase getBase()
TimeProfiler.TimeBase
for the printValue(long)
.public static void setBase(TimeProfiler.TimeBase base)
TimeProfiler.TimeBase
for the printValue(long)
.base
- the base to set.public long getCurrentValue()
Profiler
getCurrentValue
in interface Profiler
public java.lang.String printValue(long value)
Profiler
printValue
in interface Profiler
value
- the value received from Profiler.getCurrentValue()
.public java.lang.String getName()
Profiler
public long compare(long start, long end)
ComparableProfiler
Profiler.printValue(long)
.compare
in interface ComparableProfiler
start
- the initial value.end
- the final value.public boolean isBiggerPrinted(long v1, long v2)
Profiler
isBiggerPrinted
in interface Profiler
v1
- the first valuev2
- the second valuetrue
if v1 will look > v2.Profiler.printValue(long)