Hi all,
I want to make a simple System Benchmark application, is this the best way to calculate the elapsed time ?
Results on this will continue to change from time to time and seem to be not precise, may I need to use a Timer ?
Using this only the second thread of eight of my CPU is used, how I can calculate using all threads ? I need to use Threading library ?
Many thanks
I want to make a simple System Benchmark application, is this the best way to calculate the elapsed time ?
Results on this will continue to change from time to time and seem to be not precise, may I need to use a Timer ?
Using this only the second thread of eight of my CPU is used, how I can calculate using all threads ? I need to use Threading library ?
Many thanks
B4X:
Private Sub Button1_Click
Dim t1,t2 As Long
t1 = DateTime.Now
Log("S: " & t1)
Dim Number1 As Double = 3485746742.534568
Dim Number2 As Double = 46742.844366
Wait For (DivideDouble(Number1, Number2, 1000000)) Complete (rtn As Double)
t2 = DateTime.Now
Log("E: " & t2)
t1 = t2 - t1
Log("TIME: " & t1)
Log("RESULT: " & rtn)
End Sub
Sub DivideDouble (n1 As Double, n2 As Double, Repetitions As Long) As ResumableSub
Dim n3 As Double
For i = 0 To Repetitions - 1
n3 = n1 / n2
Sleep(0)
Next
Return n3
End Sub
Last edited: