Computer Science Canada Resetting Time.Elapsed |
Author: | landfarm [ Sat Dec 05, 2009 3:34 pm ] | ||
Post subject: | Resetting Time.Elapsed | ||
What is it you are trying to achieve? <Replace all the <> with your answers/code and remove the <>> What is the problem you are having? <Answer Here> Describe what you have tried to solve this problem <Answer Here> Post any relevant code (You may choose to attach the file instead of posting the code if it is too long) <Answer Here>
Please specify what version of Turing you are using <Answer Here> |
Author: | Insectoid [ Sat Dec 05, 2009 3:59 pm ] |
Post subject: | RE:Resetting Time.Elapsed |
It would be great if you, I dunno, put a question in here? |
Author: | cool1143 [ Sat Dec 05, 2009 4:04 pm ] |
Post subject: | Re: Resetting Time.Elapsed |
yea, this almost happened to me. if you say... attach a new attachment or when you preview, everything you previously typed is gone... |
Author: | Tony [ Sat Dec 05, 2009 4:22 pm ] |
Post subject: | RE:Resetting Time.Elapsed |
Confirmed the bug, and it's been logged for... eventual fixing. |
Author: | DtY [ Sat Dec 05, 2009 5:05 pm ] |
Post subject: | Re: RE:Resetting Time.Elapsed |
Tony @ Sat Dec 05, 2009 4:22 pm wrote: Confirmed the bug, and it's been logged for... eventual fixing. I think at least a warning should be given in the default text to attach files before writing out your problem, and that if you preview make sure you have a local copy |
Author: | TheGuardian001 [ Sat Dec 05, 2009 5:18 pm ] | ||
Post subject: | Re: Resetting Time.Elapsed | ||
Well, assuming that your problem is just resetting Time.Elapsed, I'm fairly certain you can't. You can however get two different values from Time.Elapsed and use them as a timer. For example, this waits for at least 10 seconds before exiting a loop.
This effectively acts as though you reset Time.Elapsed by using the value of start as your baseline, instead of when the program actually started. |
Author: | landfarm [ Sat Dec 05, 2009 8:47 pm ] |
Post subject: | Re: Resetting Time.Elapsed |
Sorry for getting back so late. I didn't realize my previous post was empty. And thanks, I'm going to try that later. I hope it works. But just in case, I'll rewrite my question. I made an animation and a game. After that, I thought it would be cool to add buttons, so I followed the guide, GUI for Dummies. I got it all working but my animation was based on a few songs, so I used Time.Elapsed to make sure the right things happened at the right time. But heres the catch, while running the loop in the GUI, it still counts as Time.Elapsed cause it started, so that is my problem. I'll see if the previous post works, and I think it would but I have to go to sleep now, to tomorrow. If there are any other ways, please advise. Thanks. |
Author: | landfarm [ Sat Dec 05, 2009 10:14 pm ] | ||
Post subject: | Re: Resetting Time.Elapsed | ||
Here is my code that has trouble. I'm only copying certain parts of it. My time still will not work. I kinda of understand it but it doesn't seem to work.
|
Author: | B-Man 31 [ Sat Dec 05, 2009 10:18 pm ] | ||||
Post subject: | Re: Resetting Time.Elapsed | ||||
TheGuardian001 @ Sat Dec 05, 2009 5:18 pm wrote: Well, assuming that your problem is just resetting Time.Elapsed, I'm fairly certain you can't. You can however get two different values from Time.Elapsed and use them as a timer. For example, this waits for at least 10 seconds before exiting a loop.
This effectively acts as though you reset Time.Elapsed by using the value of start as your baseline, instead of when the program actually started. To reset it, couldnt you just like do this:
|
Author: | landfarm [ Sat Dec 05, 2009 10:33 pm ] |
Post subject: | RE:Resetting Time.Elapsed |
Um, I'm not sure but I got it working now. |
Author: | B-Man 31 [ Sat Dec 05, 2009 10:39 pm ] |
Post subject: | RE:Resetting Time.Elapsed |
alright. thats good. |