Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: a3f34c486e6dccb35930a7b1b579a1796eeb8431 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/******************************************************************************
.
. This
 * program and the accompanying materials are made available under the terms of
 * the Eclipse Public License 2.0 which accompanies this distribution, and is
t https://www.eclipse.org/legal/epl-2.0/
t
t SPDX-License-Identifier: EPL-2.0
 *
 * Contributors:
 *   EclipseSource - initial API and implementation
 ******************************************************************************/
package org.eclipse.equinox.concurrent.future;

/**
 * Timeout exception thrown when timeout occurs
 * @since 1.1
 */
public class TimeoutException extends Exception {

	private static final long serialVersionUID = -3198307514925924297L;

	private final long duration;

	public TimeoutException(long time) {
		duration = time;
	}

	public TimeoutException(String message, long time) {
		super(message);
		this.duration = time;
	}

	/**
	 * Return the timeout duration.
	 * 
	 * @return long the timeout duration that caused this timeout exception.
	 */
	public long getDuration() {
		return duration;
	}
}

Back to the top