Miniprofiler.Current method does not return the time
问题 I'm trying to get time with this code using MiniProfiler . var profiler = StackExchange.Profiling.MiniProfiler.Current; But it returns 0 ms in result. How to get current time in miniprofiler. This method gives me result with MiniProfiler version 2.1.0. Right now I am using MiniProfiler version 3.1.1.139 . 回答1: You can get the total elapsed time for the current MiniProfiler by accessing StackExchange.Profiling.MiniProfiler.Current.DurationMilliseconds - but only after the current MiniProfiler