|
Timing
May 19, 2020 21:17:22 GMT
Post by paulhenry on May 19, 2020 21:17:22 GMT
Hi,
Just a novice question. Is there a command in JB that will time a computation that is being performed. For example, a program that factors "large" numbers?
Any help would be appreciated.
Thanks.
|
|
|
Timing
May 19, 2020 22:07:28 GMT
Post by tsh73 on May 19, 2020 22:07:28 GMT
t0= time$("ms")
input "Now press Enter as fast as you could";dummy$
t1= time$("ms") print "time passed, ms: ";t1-t0
|
|
|
Timing
May 19, 2020 22:10:21 GMT
Post by carlgundel on May 19, 2020 22:10:21 GMT
Hi, Just a novice question. Is there a command in JB that will time a computation that is being performed. For example, a program that factors "large" numbers? Try this: start = time$("ms") 'do something for x = 1 to 100000 b$ = str$(x) next x totalMS = time$("ms") - start print totalMS; " milliseconds, "; totalMS/1000; " seconds"
|
|
paulh
New Member
Posts: 7
|
Timing
May 19, 2020 23:09:31 GMT
Post by paulh on May 19, 2020 23:09:31 GMT
Thanks
|
|