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
Smarteez




PostPosted: Thu Nov 30, 2006 10:13 am   Post subject: Timer

How do I enter a timer into my game so there is a limited time to get to the end of the level?
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Thu Nov 30, 2006 10:19 am   Post subject: (No subject)

You need a way to measure the current time - as in time passed since some set point. I think Time.Elapsed will tell the time since your program began running.

Record the time at the beginning of the level, and once again when you want to check for time-out. The difference is your time passed.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
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: