Invert TimestampToTicks division

This commit is contained in:
Ben Adams 2016-01-09 09:44:10 +00:00 committed by Pranav K
parent 13c7e68fa7
commit 63a7d50dd1
2 changed files with 2 additions and 2 deletions

View File

@ -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<ILogger, string, Exception> _actionExecuting;
private static readonly Action<ILogger, string, double, Exception> _actionExecuted;

View File

@ -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];