Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update similar files #838

Merged
merged 3 commits into from
Dec 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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