Пример #1
0
 internal ExecutionTimer(
     RpcLogger logger,
     string message)
 {
     _logger  = logger;
     _message = message;
 }
Пример #2
0
        /// <summary>
        /// Create a new execution timer and start it.
        /// </summary>
        /// <param name="logger">The logger to log the execution timer message in.</param>
        /// <param name="message">The message to prefix the execution time with.</param>
        /// <returns>A new, started execution timer.</returns>
        public static ExecutionTimer Start(
            RpcLogger logger,
            string message)
        {
            var timer = new ExecutionTimer(logger, message);

            s_stopwatch.Start();
            return(timer);
        }