View Javadoc
1   package com.github.dexecutor.core;
2   
3   import java.util.concurrent.TimeUnit;
4   
5   public class Duration {
6   
7   	private final long duration;
8   	private final TimeUnit timeUnit;
9   
10  	public static final Duration MINIMAL_DURATION = new Duration(1, TimeUnit.NANOSECONDS);
11  
12  	public Duration(long duration, final TimeUnit timeUnit) {
13  		this.duration = duration;
14  		this.timeUnit = timeUnit;
15  	}
16  	/**
17  	 * 
18  	 * @return the duration
19  	 */
20  	public long getDuration() {
21  		return duration;
22  	}
23  
24  	/**
25  	 * 
26  	 * @return {@TimeUnit} of the {@duration}
27  	 */
28  	public TimeUnit getTimeUnit() {
29  		return timeUnit;
30  	}
31  }