コード例 #1
0
        public Task <LatencyResponse> PutToCache(LatencyRequest key)
        {
            var sw = new Stopwatch();

            sw.Start();
            dataCache.Value.Add(key.Key, "Whatever");
            sw.Stop();
            return(Task.FromResult(result: new LatencyResponse()
            {
                Latency = sw.ElapsedMilliseconds
            }));
        }
コード例 #2
0
 public Task<LatencyResponse> PutToCache(LatencyRequest key)
 {
     var sw = new Stopwatch();
     sw.Start();
     dataCache.Value.Add(key.Key, "Whatever");
     sw.Stop();
     return Task.FromResult(result: new LatencyResponse() { Latency = sw.ElapsedMilliseconds });
 }