问题
in Posting Before : I want to get response time on a simple math value if "button calculate" press, get sum value a and value b in textbox and also show how long to proceed that math calculation (response time) in textbox.
BUT why my result always grow up / always up like in picture how to make result stable and less volatile ?
the result when i click calculate button on a continuous
picture
coding button calculate
Private Sub Button4_Click(sender As System.Object, e As System.EventArgs) Handles Button4.Click
Dim sw = New System.Diagnostics.Stopwatch()
sw.Start()
Timer1.Start()
Me.stopwatch.Start()
TextBox3.Text = Val(TextBox1.Text) + Val(TextBox2.Text)
ListBox1.Items.Add(TextBox4.Text)
sw.Stop()
' time is a timespan that represents the time passed between sw.Start() and sw.Stop().
TextBox4.Text = (sw.Elapsed.TotalMilliseconds.ToString())
sw.Reset() End Sub
来源:https://stackoverflow.com/questions/41817694/time-elapsed-or-response-time-results-always-up-grow-up-make-it-stable