System.Net.WebSockets.WebSocketBase.KeepAliveTracker.DefaultKeepAliveTracker.GetTimeElapsed C# (CSharp) Method

GetTimeElapsed() private method

private GetTimeElapsed ( Stopwatch watch ) : TimeSpan
watch System.Diagnostics.Stopwatch
return TimeSpan
                private TimeSpan GetTimeElapsed(Stopwatch watch)
                {
                    if (watch.IsRunning)
                    {
                        return watch.Elapsed;
                    }

                    return _keepAliveInterval;
                }
            }