To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.javaOpen lugnet.robotics.rcx.java in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / Java / 207
  Help with Clock
 
I am using legjos and... having problems understanding the clock/timers. 1. Are their only one timer clock? 2. How do you acess the timers clock? What code would I use? Scott (22 years ago, 29-Aug-02, to lugnet.robotics.rcx.java)
 
  Re: Help with Clock
 
Hi Scott, (...) yes. It is like a big wall clock that shows milliseconds. (...) System.currentTimeMillis(); Note that this is a long integer. If you need more than one timer you can remember the time in variables and then compute the difference, (...) (22 years ago, 1-Sep-02, to lugnet.robotics.rcx.java)
 
  Re: Help with Clock
 
(...) Here is a Stopwatch class that does the sort of thing that Jeurgen discussed in his message. You can instantiate as many stopwatches as you want to keep track of the elapsed time between different events. import josx.platform.rcx.*; /** * (...) (22 years ago, 3-Sep-02, to lugnet.robotics.rcx.java)
 
  Re: Help with Clock
 
(...) Interesting, I should browse through the classes every now and then ... One thing to note is that josx.platform.rcx is not the right place for it, as it is independent of the RCX platform (maybe josx.util ?). (...) I think it would be better (...) (22 years ago, 3-Sep-02, to lugnet.robotics.rcx.java)
 
  Re: Help with Clock
 
What about turning the timer off that turns the RCX power off. What would be the class and method or is it a ROM routine. Thanks, Scott (22 years ago, 4-Sep-02, to lugnet.robotics.rcx.java)
 
  Re: Help with Clock
 
(...) That's currently done in the leJOS loader (see rcx_impl/main.c), and only if no program is running. So you can't turn it off, but you don't need to turn it off either once your program is running ... Jürgen (22 years ago, 5-Sep-02, to lugnet.robotics.rcx.java)

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR