Commit | Line | Data |
---|---|---|
8c8bf09f ASL |
1 | /******************************************************************************* |
2 | * Copyright (c) 2009 Ericsson | |
4f8ca6a1 | 3 | * |
8c8bf09f ASL |
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 | |
4f8ca6a1 | 8 | * |
8c8bf09f ASL |
9 | * Contributors: |
10 | * Francois Chouinard - Initial API and implementation | |
11 | *******************************************************************************/ | |
12 | ||
6c13869b | 13 | package org.eclipse.linuxtools.tmf.core.signal; |
8c8bf09f | 14 | |
3bd46eef | 15 | import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp; |
8c8bf09f ASL |
16 | |
17 | /** | |
4b7b3670 | 18 | * A new current time is selected (for component synchronization) |
4f8ca6a1 | 19 | * |
4b7b3670 FC |
20 | * @version 1.0 |
21 | * @author Francois Chouinard | |
22 | */ | |
8c8bf09f ASL |
23 | public class TmfTimeSynchSignal extends TmfSignal { |
24 | ||
4f8ca6a1 AM |
25 | private final ITmfTimestamp fCurrentTime; |
26 | ||
27 | /** | |
28 | * Constructor | |
29 | * | |
30 | * @param source | |
31 | * Object sending this signal | |
32 | * @param ts | |
33 | * Synchronize to which timestamp | |
3bd46eef | 34 | * @since 2.0 |
4f8ca6a1 AM |
35 | */ |
36 | public TmfTimeSynchSignal(Object source, ITmfTimestamp ts) { | |
37 | super(source); | |
38 | fCurrentTime = ts; | |
39 | } | |
40 | ||
41 | /** | |
42 | * @return The synchronization timestamp of this signal | |
3bd46eef | 43 | * @since 2.0 |
4f8ca6a1 AM |
44 | */ |
45 | public ITmfTimestamp getCurrentTime() { | |
46 | return fCurrentTime; | |
47 | } | |
48 | ||
49 | /* | |
50 | * (non-Javadoc) | |
51 | * | |
52 | * @see java.lang.Object#toString() | |
53 | */ | |
54 | @Override | |
55 | public String toString() { | |
56 | return "[TmfTimeSynchSignal (" + fCurrentTime.toString() + ")]"; //$NON-NLS-1$ //$NON-NLS-2$ | |
57 | } | |
8d2e2848 | 58 | |
8c8bf09f | 59 | } |