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

8 lines
222 B
C#

using System;
namespace SharpChat.Sessions {
public static class ISessionExtensions {
public static TimeSpan GetIdleTime(this ISession session)
=> session.LastPing - DateTimeOffset.Now;
}
}