The ability to calculate and show elapsed time is something that can be achieved by using an Action Timer catalog object and some Actions Editor programming logic.
This mini-lesson is intended to expose this feature to you so that you can then utilize it in your own specific way.
The basic idea is to implement the following:
The Action Timer object can be found in the Action Objects category of the catalog. This object is the key here. It has the ability to count up (called a Time of Day timer) or down (Countdown timer).
For the purposes of this example the Time of Day timer is used and is set to a Periodic value of 100 ms.
Using the Actions Editor, logic can be added to the On Media Timing Event for the Action Timer object. This event is sent to the Action Timer object every 100 ms (because this was set up for a Periodic value of 100 ms above). This means that every 1/10th of a second the timer checks to see if anything needs to be done.
There is one Parameter accessible within this event called mediaPosition. This value is the current timer value at the moment the event is triggered.
For those interested, this value is actually the number of milliseconds which have elapsed from January 1, 1970.
The logic seen below uses a few variables.
Created with the Personal Edition of HelpNDoc: Free PDF documentation generator