Quote:
Originally Posted by miw14
Thank you! I am a little bit confused though. You said time is in miliseconds, but it seemed like the Timer.delay worked fine with seconds with the mydrive.
Another question about the code. For the time conditions in the else statements, are the last two statements supposed to be greater than signs instead of less than signs? *Nevermind, I believe I understand this now.
Lastly, what do you think was the problem with the original code?
|
Sorry I should clarify. My time was in mills, hence the System.currentTimeMills(). Delay is in seconds. So the delay is 100th of a second in my case where as the first segment is 3500 mills.
Yes, putting a greater than time would be redundant in this case. The second if (first else if) can only occur if its >= 3500 mills, as the first if reserves behavior from 0 to 3499 mills.
Sounds like you understood this, but I just wanted to make sure I conveyed it a little better.