DPB2Class · Utilities and settings

WaitTimer

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 WaitTimerView DPB1 version →

Examples

Imports used by these examples
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;

Gate repeated work

var timer = new WaitTimer(TimeSpan.FromSeconds(1));
timer.Reset();

// In a later tick, using the same timer instance:
if (timer.IsFinished)
{
    timer.Reset();
    // Perform the periodic check here.
}

Store the timer on your component; do not recreate it on every tick.

Members and overloads

15 results

Finished

EventLink ↗
public WaitTimerFinishedHandler WaitTimer.Finished

Raised for finished. Subscribe with the callback type shown in the signature.

WaitTimer

MethodLink ↗
public WaitTimer.WaitTimer(TimeSpan waitTime)

Creates a new WaitTimer instance using the supplied arguments.

waitTimeTimeSpan
Specifies wait time.

Reset

MethodLink ↗
public void WaitTimer.Reset()

Executes the reset operation.

Reset

MethodLink ↗
public void WaitTimer.Reset(TimeSpan newDuration)

Executes the reset operation with the supplied arguments.

newDurationTimeSpan
Specifies new duration.

Stop

MethodLink ↗
public void WaitTimer.Stop()

Stops this component's lifecycle.

Update

MethodLink ↗
public void WaitTimer.Update()

Executes the update operation.

EndTime

PropertyLink ↗
public DateTime WaitTimer.EndTime { get; }

Gets end time for WaitTimer.

FiveSeconds

PropertyLink ↗
public static WaitTimer WaitTimer.FiveSeconds { get; }

Gets five seconds for WaitTimer.

IsFinished

PropertyLink ↗
public bool WaitTimer.IsFinished { get; }

Whether this wait timer is finished.

OneSecond

PropertyLink ↗
public static WaitTimer WaitTimer.OneSecond { get; }

Gets one second for WaitTimer.

StartTime

PropertyLink ↗
public DateTime WaitTimer.StartTime { get; private set; }

Gets start time for WaitTimer.

TenSeconds

PropertyLink ↗
public static WaitTimer WaitTimer.TenSeconds { get; }

Gets ten seconds for WaitTimer.

ThirtySeconds

PropertyLink ↗
public static WaitTimer WaitTimer.ThirtySeconds { get; }

Gets thirty seconds for WaitTimer.

TimeLeft

PropertyLink ↗
public TimeSpan WaitTimer.TimeLeft { get; }

Gets time left for WaitTimer.

WaitTime

PropertyLink ↗
public TimeSpan WaitTimer.WaitTime { get; set; }

Gets or sets wait time for WaitTimer.

Related types

DPB2 0.4.5.88 · Reference reviewed 2026-10-02. Descriptions use source summaries where available, otherwise concise signature-based descriptions. Examples illustrate usage; they are not a live-game test.