1 /*******************************************************************************
2 * Copyright (c) 2015, 2016 EfficiOS Inc., Alexandre Montplaisir
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *******************************************************************************/
10 package org
.eclipse
.tracecompass
.internal
.provisional
.analysis
.lami
.core
.types
;
12 import org
.eclipse
.jdt
.annotation
.Nullable
;
15 * Lami time range data type
17 * @author Alexandre Montplaisir
19 public class LamiTimeRange
extends LamiData
{
21 private final long fStart
;
22 private final long fEnd
;
23 private final long fDuration
;
26 * Construct a new time range
33 public LamiTimeRange(long start
, long end
) {
36 fDuration
= fEnd
- fStart
;
40 * Get the start time of this time range.
42 * @return The start time
44 public long getStart() {
49 * Get the end time of this time range.
51 * @return The end time
53 public long getEnd() {
57 * Get the duration of this time range.
59 * @return The duration
61 public long getDuration() {
66 public @Nullable String
toString() {
67 return "[" + String
.valueOf(fStart
) + " - " + String
.valueOf(fEnd
) + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
This page took 0.032818 seconds and 5 git commands to generate.