Table of Contents

Class ServerHeartbeatTimer

Namespace
Uncreated.Warfare.Stats
Assembly
Uncreated.Warfare.dll

Saves the last time the server was able to write to a file every 10 seconds. Used to fix sessions that don't get ended properly.

public class ServerHeartbeatTimer : IHostedService, IDisposable
Inheritance
ServerHeartbeatTimer
Implements
Inherited Members

Constructors

ServerHeartbeatTimer(ILoopTickerFactory, ILogger<ServerHeartbeatTimer>)

public ServerHeartbeatTimer(ILoopTickerFactory tickerFactory, ILogger<ServerHeartbeatTimer> logger)

Parameters

tickerFactory ILoopTickerFactory
logger ILogger<ServerHeartbeatTimer>

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

GetLastBeat()

public DateTimeOffset? GetLastBeat()

Returns

DateTimeOffset?