Results 1 to 1 of 1
Thread: variable speed clock
- 10-14-2011, 02:58 PM #1Member
- Join Date
- Oct 2011
- Rep Power
variable speed clock
At one point, I learned some java programming, but due to not using it, I have probably forgotten a lot.
I am now trying to find out how to make or locate a readymade small program that will display elapsed time, but with a couple of tweaks.
To start off, I just want it to display on the pc, text is fine, should be able to get the text into a GUI fairly easily, but later I need to output data to a serial connection to a 6-digit led display. Well, three displays, acutally.
Time format is 24H, showing HH:MM:SS
Starting time must be adjustable, i.e. we should be able to define the starting time to any given time of day. Should be trivial via standard set-method
Time counting must have a start and a pause function.
And time speed must be adjustable, we need a function so we can slow down the time or speed up the time at will.
I am thinking along the lines of a function that adds one second at a time, then each 60 seconds adding a minute and resetting the seconds to 00, and likewise with the hours. The function would run in an endless loop with a wait function where the wait time is adjustable from 500 to 2000 mS.
And just to answer the question as to why the clock speed must be adjustable:
We are doing training on a simulator where we sometimes need to slow down time to allow students to complete tasks within a given time, but for new students this might be difficult. By slowing down time they will think they manage well and get the confidence to do the tasks faster next time, and finally they will master the task within the actual time allotted. And no, students will not notice that time is running slower, they will be engrossed in carrying out the task at hand.
At other times during simulation, not much is going on, and we wish to speed up time until we reach the next event, thus getting more events into a given simulator session.
- By bs3ac in forum New To JavaReplies: 4Last Post: 01-08-2013, 10:10 AM
- By Bimz in forum New To JavaReplies: 1Last Post: 09-26-2011, 01:50 PM
- By Giuseppe_Mazzei in forum New To JavaReplies: 9Last Post: 06-03-2011, 02:28 AM
- By bezudar in forum Advanced JavaReplies: 3Last Post: 11-20-2008, 09:53 AM
- By bbq in forum JDBCReplies: 1Last Post: 06-28-2007, 05:34 PM