| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
package org.fest.swing.timing; |
| 17 |
|
|
| 18 |
|
import java.util.concurrent.TimeUnit; |
| 19 |
|
|
| 20 |
|
|
| 21 |
|
|
| 22 |
|
|
| 23 |
|
@author |
| 24 |
|
@author |
| 25 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (12) |
Complexity: 5 |
Complexity Density: 0.83 |
|
| 26 |
|
public final class Timeout { |
| 27 |
|
|
| 28 |
|
private final long duration; |
| 29 |
|
|
| 30 |
|
|
| 31 |
|
@link |
| 32 |
|
@param |
| 33 |
|
@return |
| 34 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 35 |
80
|
public static Timeout timeout(long duration) {... |
| 36 |
80
|
return new Timeout(duration); |
| 37 |
|
} |
| 38 |
|
|
| 39 |
|
|
| 40 |
|
@link |
| 41 |
|
@param |
| 42 |
|
@param |
| 43 |
|
@return |
| 44 |
|
@throws |
| 45 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 2 |
Complexity Density: 0.67 |
|
| 46 |
34
|
public static Timeout timeout(long duration, TimeUnit timeUnit) {... |
| 47 |
1
|
if (timeUnit == null) throw new NullPointerException("Time unit should not be null"); |
| 48 |
33
|
return new Timeout(timeUnit.toMillis(duration)); |
| 49 |
|
} |
| 50 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 51 |
113
|
private Timeout(long duration) {... |
| 52 |
113
|
this.duration = duration; |
| 53 |
|
} |
| 54 |
|
|
| 55 |
|
|
| 56 |
|
|
| 57 |
|
@return |
| 58 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 59 |
67
|
public long duration() { return duration; }... |
| 60 |
|
} |