# Class: com.pnfsoftware.jeb.util.concurrent.Watchdog

Enforce time\-outs on operations and throw [OperationTimedOutException](OperationTimedOutException). Same as [TimedOperationVerifier](TimedOperationVerifier).

## Constructor: Watchdog
- parameter: `t0`, type: `long`
- parameter: `maxExecTime`, type: `long`

Description: Create a watchdog.
parameter: t0: epoch\-relative timestamp in milliseconds
parameter: maxExecTime: maximum allowed execution time in milliseconds; 0 means no limit

## Constructor: Watchdog
- parameter: `maxExecTime`, type: `long`

Description: Create a watchdog whose start time is the current time.
parameter: maxExecTime: maximum allowed execution time in milliseconds; 0 means no limit

## Constructor: Watchdog

Description: Create a watchdog with no time limit.

## Method: getInitTime
- return type: `long`

Description: Get the watchdog's start time.
return: epoch\-relative start timestamp, in milliseconds

## Method: getMaxExecTime
- return type: `long`

Description: Get the maximum allowed execution time.
return: maximum execution time in milliseconds; 0 means no limit

## Method: verify

Description: Verify that the current thread has not been interrupted and the timeout has not elapsed.
throws: if the current thread is interrupted or the timeout             elapsed

## Static Method: reportInterruption
- parameter: `e`, type: `java.lang.InterruptedException`

Description: Report an interruption as an operation timeout.
parameter: e: interruption to wrap
throws: always thrown

## Static Method: verify
- parameter: `o`, type: `com.pnfsoftware.jeb.util.concurrent.Watchdog`

Description: Verify an operation using the provided watchdog or the default watchdog.
parameter: o: watchdog to use, or null to use the default watchdog
throws: if the current thread is interrupted or the timeout             elapsed

## Static Method: verifyInterruptions

Description: Verify that the current thread has not been interrupted.
throws: if the current thread is interrupted

