sharp-chat/SharpChat.Common/Sessions/ISessionExtensions.cs

9 lines
222 B
C#
Raw Permalink Normal View History

2022-08-30 15:05:29 +00:00
using System;
namespace SharpChat.Sessions {
public static class ISessionExtensions {
public static TimeSpan GetIdleTime(this ISession session)
=> session.LastPing - DateTimeOffset.Now;
}
}