Skip to content

Commit

Permalink
Update similar files (#838)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wraith2 authored Dec 22, 2020
1 parent d02bf4b commit bccf766
Show file tree
Hide file tree
Showing 11 changed files with 340 additions and 368 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -609,11 +609,6 @@ internal static Delegate FindBuilder(MulticastDelegate mcd)
return null;
}

internal static void TimerCurrent(out long ticks)
{
ticks = DateTime.UtcNow.ToFileTimeUtc();
}

internal static long TimerCurrent()
{
return DateTime.UtcNow.ToFileTimeUtc();
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ public bool StatisticsEnabled
if (null == _statistics)
{
_statistics = new SqlStatistics();
ADP.TimerCurrent(out _statistics._openTimestamp);
_statistics._openTimestamp = ADP.TimerCurrent();
}
// set statistics on the parser
// update timestamp;
Expand All @@ -385,7 +385,7 @@ public bool StatisticsEnabled
TdsParser parser = Parser;
Debug.Assert(parser != null, "Where's the parser?");
parser.Statistics = null;
ADP.TimerCurrent(out _statistics._closeTimestamp);
_statistics._closeTimestamp = ADP.TimerCurrent();
}
}
}
Expand Down Expand Up @@ -1095,7 +1095,7 @@ public override void Close()

if (null != Statistics)
{
ADP.TimerCurrent(out _statistics._closeTimestamp);
_statistics._closeTimestamp = ADP.TimerCurrent();
}
}
catch (Exception ex)
Expand Down Expand Up @@ -1709,7 +1709,7 @@ private bool TryOpen(TaskCompletionSource<DbConnectionInternal> retry, SqlConnec
if (StatisticsEnabled ||
(s_diagnosticListener.IsEnabled(SqlClientDiagnosticListenerExtensions.SqlAfterExecuteCommand) && statistics != null))
{
ADP.TimerCurrent(out _statistics._openTimestamp);
_statistics._openTimestamp = ADP.TimerCurrent();
tdsInnerConnection.Parser.Statistics = _statistics;
}
else
Expand Down Expand Up @@ -2070,7 +2070,7 @@ public void ResetStatistics()
if (ConnectionState.Open == State)
{
// update timestamp;
ADP.TimerCurrent(out _statistics._openTimestamp);
_statistics._openTimestamp = ADP.TimerCurrent();
}
}
}
Expand All @@ -2094,7 +2094,7 @@ private void UpdateStatistics()
if (ConnectionState.Open == State)
{
// update timestamp
ADP.TimerCurrent(out _statistics._closeTimestamp);
_statistics._closeTimestamp = ADP.TimerCurrent();
}
// delegate the rest of the work to the SqlStatistics class
Statistics.UpdateStatistics();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ internal bool RequestExecutionTimer()
{
if (_startExecutionTimestamp == 0)
{
ADP.TimerCurrent(out _startExecutionTimestamp);
_startExecutionTimestamp = ADP.TimerCurrent();
return true;
}
return false;
Expand All @@ -138,7 +138,7 @@ internal void RequestNetworkServerTimer()
Debug.Assert(_startExecutionTimestamp != 0, "No network time expected outside execution period");
if (_startNetworkServerTimestamp == 0)
{
ADP.TimerCurrent(out _startNetworkServerTimestamp);
_startNetworkServerTimestamp = ADP.TimerCurrent();
}
_waitForReply = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ internal static int GetTimeoutMilliseconds(long timeoutTime)
return (int)msecRemaining;
}


internal static long GetTimeout(long timeoutMilliseconds)
{
long result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2271,11 +2271,6 @@ static internal bool NeedManualEnlistment()
return false;
}

static internal void TimerCurrent(out long ticks)
{
ticks = DateTime.UtcNow.ToFileTimeUtc();
}

static internal long TimerCurrent()
{
return DateTime.UtcNow.ToFileTimeUtc();
Expand Down
Loading

0 comments on commit bccf766

Please sign in to comment.