public WaitTimerFinishedHandler WaitTimer.Finished
Raised by Update after the interval has elapsed. Reading IsFinished alone does not raise this event.
Track a time interval without blocking the bot. Keep the same timer instance between ticks and reset it after the periodic work.
Namespace: DreamPoeBot.Loki.Common
public class WaitTimerStart with a concrete example: Gate repeated work →
public WaitTimerFinishedHandler WaitTimer.Finished
Raised by Update after the interval has elapsed. Reading IsFinished alone does not raise this event.
public WaitTimer.WaitTimer(TimeSpan waitTime)
Creates a new WaitTimer instance using the supplied arguments.
waitTimeTimeSpanpublic void WaitTimer.Reset()
Starts a new interval now, using the supplied duration when provided. IsFinished remains false until the interval has elapsed.
public void WaitTimer.Reset(TimeSpan newDuration)
Starts a new interval now, using the supplied duration when provided. IsFinished remains false until the interval has elapsed.
newDurationTimeSpanpublic void WaitTimer.Stop()
Moves the start time five days into the past, making short intervals immediately eligible. This does not stop the bot or its components.
public void WaitTimer.Update()
Raises Finished if the interval has elapsed and a handler is subscribed. Call Reset to prevent repeated notifications on later Update calls.
public DateTime WaitTimer.EndTime { get; }
Gets end time for WaitTimer.
public static WaitTimer WaitTimer.FiveSeconds { get; }
Gets five seconds for WaitTimer.
public bool WaitTimer.IsFinished { get; }
Whether this wait timer is finished.
public static WaitTimer WaitTimer.OneSecond { get; }
Gets one second for WaitTimer.
public DateTime WaitTimer.StartTime { get; private set; }
Gets start time for WaitTimer.
public static WaitTimer WaitTimer.TenSeconds { get; }
Gets ten seconds for WaitTimer.
public static WaitTimer WaitTimer.ThirtySeconds { get; }
Gets thirty seconds for WaitTimer.
public TimeSpan WaitTimer.TimeLeft { get; }
Gets time left for WaitTimer.
public TimeSpan WaitTimer.WaitTime { get; set; }
Gets or sets wait time for WaitTimer.
using System;
using System.Linq;
using DreamPoeBot.Loki.Game;
using DreamPoeBot.Loki.Game.Objects;
using DreamPoeBot.Loki.Bot;
using DreamPoeBot.Loki.Bot.Pathfinding;
using DreamPoeBot.Loki.Common;public sealed class PeriodicCheck
{
private readonly WaitTimer _timer = new WaitTimer(TimeSpan.FromSeconds(1));
public void Start() { _timer.Stop(); } // First check is immediately eligible.
public void Tick()
{
if (!_timer.IsFinished) return;
_timer.Reset();
// Perform one bounded check here.
}
}Requires System and DreamPoeBot.Loki.Common. This is a helper class, not a discoverable plugin: own one instance in your component and call its Start/Tick. The timer is a field, so it survives between ticks. Stop makes this timer eligible; it does not suspend the component.
See how these APIs fit together. Labs include complete source; the FollowBot walkthrough teaches you to build your own bot from selected fragments and checkpoints.
DPB1 0.3.29.47 · Reference reviewed 2026-10-03. Descriptions use source summaries where available, otherwise concise signature-based descriptions. Examples illustrate usage; they are not a live-game test.