dd4957643b72814d04edb3461d42de0ebacf9a54
4 package org
.eclipse
.linuxtools
.lttng
.stubs
;
6 import org
.eclipse
.linuxtools
.tmf
.core
.event
.TmfTimestamp
;
12 @SuppressWarnings("nls")
13 public class LTTngTimestampStub
extends TmfTimestamp
{
18 private static final long serialVersionUID
= 216576768443708259L;
25 public LTTngTimestampStub(long value
) {
26 super(value
, (byte) -3, 0); // millisecs
30 * @see org.eclipse.linuxtools.tmf.event.TmfTimestamp#toString()
33 public String
toString() {
35 // If we are dealing with units of seconds (or higher),
36 // use the plain formatter
38 Double value
= fValue
* Math
.pow(10, fScale
);
39 return value
.toString();
42 // Define a format string
43 String format
= String
.format("%%1d.%%0%dd", -fScale
);
45 // And format the timestamp value
46 double scale
= Math
.pow(10, fScale
);
47 long seconds
= (long) (fValue
* scale
);
48 long fracts
= fValue
- (long) ((double) seconds
/ scale
);
49 String result
= String
.format(format
, seconds
, fracts
);
This page took 0.032605 seconds and 5 git commands to generate.