KestrunHost.Uptime property
Gets the uptime duration of the Kestrun host. While running (no StopTime yet), this returns DateTime.UtcNow - StartTime. After stopping, it returns StopTime - StartTime. If StartTime is not set, returns null.
public TimeSpan? Uptime { get; }
See Also
- class KestrunHost
- namespace Kestrun.Hosting