Example #1
0
        internal static T InvokeGls <T>(LatencyTracker latencyTracker, Func <T> glsCall)
        {
            if (latencyTracker == null)
            {
                throw new ArgumentNullException("latencyTracker");
            }
            if (glsCall == null)
            {
                throw new ArgumentNullException("glsCall");
            }
            long latency  = 0L;
            T    latency2 = LatencyTracker.GetLatency <T>(() => glsCall(), out latency);

            latencyTracker.HandleGlsLatency(latency);
            return(latency2);
        }