-
Notifications
You must be signed in to change notification settings - Fork 6
Running Timer
ZjzMisaka edited this page Sep 18, 2024
·
1 revision
After setting WorkOption.RunningTimerOption, Action<RunningTimerElapsedEventArgs> Elapsed
will occur when the interval elapses, but only if the thread pool is in the Running state.
[Get only]
The date/time when the System.Timers.Timer.Elapsed event was raised.
DateTime SignalTime;
[Get only]
Pool runtime duration.
TimeSpan RuntimeDuration;
PowerPool powerPool = new PowerPool(new PowerPoolOption
{
RunningTimerOption = new RunningTimerOption
{
Elapsed = (e) =>
{
// Perform an action every 500ms
// Access the signal time: e.SignalTime
// Access the runtime duration: e.RuntimeDuration
},
Interval = 500,
}
});
- Pool Control | Work Control
- Thread Pool Sizing
- Work Callback | Default Callback
- Parallel Execution
- Work Priority | Thread Priority
- Error Handling
- Work Timeout | Cumulative Work Timeout
- Work Dependency
- Work Group
- Events
- Runtime Status
- Running Timer
- Queue Type (FIFO | LIFO | Custom)
- Load Balancing
- Lock-Free
Core
Results
Options