Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 In regard to timing...
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Piro24




PostPosted: Tue Nov 07, 2006 8:51 pm   Post subject: In regard to timing...

I want to know if there is a command I could use that would start timing at a given point...Time.Elapsed starts counting time as soon as the program starts to run, regardless of where it is in the program...

I want to know how many seconds have gone by in a loop, and Time.Elapsed doesnt seem right for that.

Any help?
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Tue Nov 07, 2006 9:22 pm   Post subject: (No subject)

Time.Elapsed is perfect. You can record a value, and use it later.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
ericfourfour




PostPosted: Tue Nov 07, 2006 10:26 pm   Post subject: (No subject)

Time.Elapsed is the amount of time the program has been running. It is also the difference between the start time and the current time. What you have to do is find the difference between two times. Except these two times may not be the start time and the current time. This is where you have to use variables.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: