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

Username:   Password: 
 RegisterRegister   
 Timer
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
timmy otoole




PostPosted: Thu May 10, 2012 9:50 am   Post subject: Timer

What is it you are trying to achieve?
I want to make a timer that counts the seconds since I started the program.

What is the problem you are having?
I can get the start up time of the program and the ending time, but I can't get it to count the seconds as they pass.


Describe what you have tried to solve this problem
Variations with Time.Elapse


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)

var start_time,elapsed_time:real
elapsed_time := (Time.Elapsed-start_time) /1000
put elapsed_time:0:2
Turing:




Please specify what version of Turing you are using
<Answer Here>
Sponsor
Sponsor
Sponsor
sponsor
Amarylis




PostPosted: Thu May 10, 2012 12:23 pm   Post subject: RE:Timer

Turing:
loop
Text.Locate (1, 1)
put Time.Elapsed div 1000
end loop
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  [ 2 Posts ]
Jump to:   


Style:  
Search: