Table of Contents

Class WorldTimer

Namespace
RisingV.Shared.Utils
Assembly
RisingV.Shared.dll

A timer that runs an action in the world at a specified interval.

public class WorldTimer : IDisposable
Inheritance
WorldTimer
Implements
Inherited Members
Extension Methods

Methods

Dispose()

Disposes of the timer, stopping it if it is enabled.

public void Dispose()

Start(Action<World>?, Func<object, TimeSpan>)

Start the WorldTimer class with a specified delay action.

public void Start(Action<World>? action, Func<object, TimeSpan> delayAction)

Parameters

action Action<World>

The action to run in the world.

delayAction Func<object, TimeSpan>

The function that returns the delay based on an object.

Start(Action<World>?, TimeSpan)

Start the WorldTimer class with a specified delay.

public void Start(Action<World>? action, TimeSpan delay)

Parameters

action Action<World>

The action to run in the world.

delay TimeSpan

The delay between runs of the action.

Stop()

Stops the timer, unsubscribing from the update event and disabling the timer.

public void Stop()