Methods Summary |
---|
public double | getScaledValue(long value)
return value * mScale;
|
public double | getScaledValue(double value)
return value * mScale;
|
public com.android.traceview.TraceUnits$TimeScale | getTimeScale()
return mTimeScale;
|
public java.lang.String | label()
if (mScale == 1.0)
return "usec";
if (mScale == 0.001)
return "msec";
if (mScale == 0.000001)
return "sec";
return null;
|
public java.lang.String | labelledString(double value)
String units = label();
String num = valueOf(value);
return String.format("%s: %s", units, num);
|
public java.lang.String | labelledString(long value)
return labelledString((double) value);
|
public void | setTimeScale(com.android.traceview.TraceUnits$TimeScale val)
mTimeScale = val;
switch (val) {
case Seconds:
mScale = 0.000001;
break;
case MilliSeconds:
mScale = 0.001;
break;
case MicroSeconds:
mScale = 1.0;
break;
}
|
public java.lang.String | valueOf(long value)
return valueOf((double) value);
|
public java.lang.String | valueOf(double value)
String pattern;
double scaled = value * mScale;
if ((int) scaled == scaled)
pattern = "###,###";
else
pattern = "###,###.###";
mFormatter.applyPattern(pattern);
return mFormatter.format(scaled);
|