From 96c3e746ad2a77f80ae403622a42bf55a7042f49 Mon Sep 17 00:00:00 2001 From: Anthony Dresser Date: Fri, 28 Oct 2016 11:52:39 -0700 Subject: [PATCH] change time when the batch time is set (#118) --- src/Microsoft.SqlTools.ServiceLayer/QueryExecution/Batch.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/Batch.cs b/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/Batch.cs index 17901e6a..7b54484e 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/Batch.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/QueryExecution/Batch.cs @@ -38,7 +38,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution /// /// Local time when the execution starts, specifically when the object is created /// - private readonly DateTime executionStartTime; + private DateTime executionStartTime; /// /// Factory for creating readers/writers for the output of the batch @@ -65,7 +65,6 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution // Initialize the internal state BatchText = batchText; - executionStartTime = DateTime.Now; Selection = new SelectionData(startLine, startColumn, endLine, endColumn); HasExecuted = false; resultSets = new List(); @@ -198,6 +197,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution command.CommandText = BatchText; command.CommandType = CommandType.Text; command.CommandTimeout = 0; + executionStartTime = DateTime.Now; // Execute the command to get back a reader using (DbDataReader reader = await command.ExecuteReaderAsync(cancellationToken))