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

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




PostPosted: Mon Jun 09, 2003 8:08 pm   Post subject: Clock

Is there any way to have the clock function not start at the beginning of a program but at any point.

i.e. since i am makin a track game i want the clock to start when the user selects that game from the menu. right now the problem is the clock starts with that program.

thanks
Sponsor
Sponsor
Sponsor
sponsor
nate




PostPosted: Mon Jun 09, 2003 8:11 pm   Post subject: make it a process

If you make if a process then it will start when ever you call it

var time :int
process timer
loop
clock (time)
end loop
end timer

put "Put i will wait 1 sec b4 starting the clock"
delay (1000)
fork timer


hope this is what u want!
AsianSensation




PostPosted: Mon Jun 09, 2003 9:43 pm   Post subject: (No subject)

var t1, t2:int

whenever you want to start the timing

t1:=Time.Elapsed

blah, blah, blah(the code, for the jumping)

when you are finished, or the code triggers it,
t2:=Time.Elapsed

the total time passed is: t2 minus t1
AsianSensation




PostPosted: Mon Jun 09, 2003 9:45 pm   Post subject: (No subject)

oh, btw, do your best to avoid processes, they are slow, not timed well enough, and take up alot of memory, use it only when you are playing background music.
Catalyst




PostPosted: Mon Jun 09, 2003 9:46 pm   Post subject: (No subject)

cant stress that point enough
born130




PostPosted: Thu Jun 12, 2003 2:26 pm   Post subject: (No subject)

code please
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  [ 6 Posts ]
Jump to:   


Style:  
Search: