From b935a44065bafc7a9fd55b021292c0f62a04d2e8 Mon Sep 17 00:00:00 2001 From: Michael Emmi Date: Fri, 27 Dec 2019 14:37:07 -0500 Subject: [PATCH] Restore TotalUserTime field removed by 714d5a0. --- Source/Provers/SMTLib/SMTLibProcess.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Source/Provers/SMTLib/SMTLibProcess.cs b/Source/Provers/SMTLib/SMTLibProcess.cs index 36f568e23..96a74e28d 100644 --- a/Source/Provers/SMTLib/SMTLibProcess.cs +++ b/Source/Provers/SMTLib/SMTLibProcess.cs @@ -190,8 +190,21 @@ public SExpr GetProverResponse() } } + + // NOTE: this field is used by Corral. + // https://github.com/boogie-org/corral/blob/master/source/Driver.cs + public static System.TimeSpan TotalUserTime = System.TimeSpan.Zero; + public void Close() { + try { + TotalUserTime += prover.UserProcessorTime; + } catch (Exception e) { + if (options.Verbosity >= 1) { + Console.Error.WriteLine("Warning: prover time not incremented due to {0}", e.GetType()); + } + } + TerminateProver(); DisposeProver(); } @@ -394,4 +407,3 @@ void prover_ErrorDataReceived(object sender, DataReceivedEventArgs e) #endregion } } -