Computer Science Canada How to insert a timer (seconds) |
Author: | hq78 [ Sat Dec 18, 2004 1:38 pm ] |
Post subject: | How to insert a timer (seconds) |
Hello, I would like to know if anyone here knows how to add a timer in a loop in seconds. Thanks in advance! |
Author: | Cervantes [ Sat Dec 18, 2004 1:45 pm ] | ||
Post subject: | |||
There sure is a way to do it ![]()
Note that Time.Elapsed returns a value in milliseconds. Thus, divide that value by 1000 to get a value in seconds. |
Author: | hq78 [ Sat Dec 18, 2004 5:14 pm ] |
Post subject: | |
thank you very much! |
Author: | zomg [ Sat Dec 18, 2004 11:28 pm ] |
Post subject: | |
doesnt time.elapsed measure cpu time not actual time? ![]() |
Author: | Neo [ Sat Dec 18, 2004 11:48 pm ] |
Post subject: | |
shadow master wrote: doesnt time.elapsed measure cpu time not actual time?
![]() Im pretty sure its the actual length of time since starting the program. |
Author: | Cervantes [ Sun Dec 19, 2004 8:25 am ] |
Post subject: | |
shadow master wrote: doesnt time.elapsed measure cpu time not actual time?
![]() ssshh.... ![]() |
Author: | Mazer [ Sun Dec 19, 2004 9:34 am ] |
Post subject: | |
shadow master wrote: doesnt time.elapsed measure cpu time not actual time?
![]() Turing Reference wrote: The Time.Elapsed function returns the amount of time since a program (process) started running. The number of milliseconds since the program started running is returned.
Well. Nope. It's just that it's not always accurate. |
Author: | Cervantes [ Sun Dec 19, 2004 9:42 am ] |
Post subject: | |
As Delos said, it varies from CPU to CPU. |