diff --git a/src/Microsoft.AspNet.Mvc.Core/Logging/MvcRouteHandlerLoggerExtensions.cs b/src/Microsoft.AspNet.Mvc.Core/Logging/MvcRouteHandlerLoggerExtensions.cs index 11db7286ee..0a1be7625d 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Logging/MvcRouteHandlerLoggerExtensions.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Logging/MvcRouteHandlerLoggerExtensions.cs @@ -11,7 +11,7 @@ namespace Microsoft.AspNet.Mvc.Logging { internal static class MvcRouteHandlerLoggerExtensions { - private static readonly double TimestampToTicks = Stopwatch.Frequency / 10000000.0; + private static readonly double TimestampToTicks = TimeSpan.TicksPerSecond / (double)Stopwatch.Frequency; private static readonly Action _actionExecuting; private static readonly Action _actionExecuted; diff --git a/src/Microsoft.AspNet.Mvc.ViewFeatures/Logging/DefaultViewComponentInvokerLoggerExtensions.cs b/src/Microsoft.AspNet.Mvc.ViewFeatures/Logging/DefaultViewComponentInvokerLoggerExtensions.cs index d19159523c..a3e7d87b67 100644 --- a/src/Microsoft.AspNet.Mvc.ViewFeatures/Logging/DefaultViewComponentInvokerLoggerExtensions.cs +++ b/src/Microsoft.AspNet.Mvc.ViewFeatures/Logging/DefaultViewComponentInvokerLoggerExtensions.cs @@ -11,7 +11,7 @@ namespace Microsoft.AspNet.Mvc.ViewFeatures.Logging { public static class DefaultViewComponentInvokerLoggerExtensions { - private static readonly double TimestampToTicks = Stopwatch.Frequency / 10000000.0; + private static readonly double TimestampToTicks = TimeSpan.TicksPerSecond / (double)Stopwatch.Frequency; private static readonly string[] EmptyArguments = #if NET451 new string[0];