|
-
Oct 3rd, 2005, 05:07 AM
#1
Thread Starter
Addicted Member
Timer's Current Tick Value
If one has a Timer that has an interval of 10000 = 10 Seconds, then another timer with a interval of 20 which must take timer 1's Interval subtract it from the Current Value eg 4000, how does one do this?
Curiosity SKILLED the cat
Google Talk from your Mobile phone
Chat from your mobile or get an emulator like J2ME Wireless Toolkit 2.2
-
Oct 3rd, 2005, 05:23 AM
#2
Re: Timer's Current Tick Value
The timer does not have any property which specifies the amount of time that has passed. What you can do instead, is to perform calculations. After every Timer2 tick, multiply the number of ticks that have occurred by 20, and subtract from 4000 * number of timer1 ticks.
-
Oct 3rd, 2005, 07:24 AM
#3
Frenzied Member
Re: Timer's Current Tick Value
The amount of ticks must be declared outside of the timer event too..
If you find my thread helpful, please remember to rate me 
-
Oct 3rd, 2005, 07:59 AM
#4
Re: Timer's Current Tick Value
If you want elapsed time then the best thing to do is store the current time (Dim startTime As Date = Date.Now) in a variable when you start. You can then Subtract that variable from the current time later (Dim elapsedTime As TimeSpan = Date.Now.Subtract(startTime)).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|