Time.Deadline
class · namespace z3n7 · source Essentials/Time.cs
public class Deadline
Stopwatch that throws once a time limit is exceeded.
Constructors
Deadline
public Deadline()
Starts the stopwatch.
Methods
Check
public double Check(double limitSec)
Returns the seconds elapsed since start or the last Reset.
| Parameter | Description |
|---|---|
limitSec |
Limit in seconds; exceeding it throws TimeoutException. |
Reset
public void Reset()
Restarts the stopwatch.