Files
RobustToolbox/Robust.Shared/Timing/ITimerManager.cs
slarticodefast 4747e5a05a Add and update a lot of documentation (#6337)
* Serialization docs

Co-authored-by: Moony <moonheart08@users.noreply.github.com>

* ECS docs

Co-authored-by: Moony <moonheart08@users.noreply.github.com>

* scattered docs

Co-authored-by: Moony <moonheart08@users.noreply.github.com>

* Fixes

---------

Co-authored-by: Moony <moonheart08@users.noreply.github.com>
Co-authored-by: PJB3005 <pieterjan.briers+git@gmail.com>
2025-12-15 20:26:17 +01:00

23 lines
844 B
C#

using System.Threading;
namespace Robust.Shared.Timing
{
/// <summary>
/// Manages <see cref="Timer"/>-based timing, allowing you to register new timers with optional cancellation.
/// </summary>
public interface ITimerManager
{
/// <summary>
/// Registers a timer with the manager, which will be executed on the main thread when its duration has
/// elapsed.
/// </summary>
/// <remarks>
/// Due to the granularity of the game simulation, the wait time for timers is will (effectively) round to
/// the nearest multiple of a tick, as they can only be processed on tick.
/// </remarks>
void AddTimer(Timer timer, CancellationToken cancellationToken = default);
void UpdateTimers(FrameEventArgs frameEventArgs);
}
}