Back to Clock Service Examples Page Back

Clock Example: Controlled Clock

Description

This example will demonstrate how to obtain the current time from a Controlled Clock object. A reference to the ControlledClock is obtained and the current_time() operation invoked on it. The result of invoking current_time() is displayed on the standard output device.

Note: This particular example will not work with a Mission Clock since other operations need to be invoked prior to the current_time() operation on Mission Clocks.

Source File

The source file for the Controlled Clock example is:

GenericControlledClockQuery.java

How To Run This Example

  1. Before the ClockService is started, ensure that the ControlledClockSingleton is NOT configured as a Mission clock.
  2. Start the Clock Service from the command line or by using the Administration Manager.

    From the command line use:

    server -start ClockService

    Using the Administration Manager:

    Start the Administration Manager, right click on the ClockService node and select Start from the pop-up menu.

  3. Start the client:
    run com.prismt.cos.CosClockService.examples.GenericControlledClockQuery


PrismTech TOP
Top