Hello

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.

Any ideas?