Interface TimeService

All Known Implementing Classes:
RealtimeTimeService, SimulationTimeService

public interface TimeService
The time service provides the so call mission time.

There is one such service for each Yamcs instance.

Different implementations of these can alow to simulate time in the past or in the future or provide a time synchronized with a simulator.

  • Method Summary

    Modifier and Type
    Method
    Description
    default Instant
     
    long
     
    default double
    If the time service is a simulated time, this gives the relation between the (simulated) mission time and the wall clock time: 1.0 = realtime speed. >1.0 = faster than realtime <1.0 = slower than realtime.
  • Method Details

    • getMissionTime

      long getMissionTime()
      Returns:
      the mission time in Yamcs millisecond resolution
    • getHresMissionTime

      default Instant getHresMissionTime()
      Returns:
      the mission time in high resolution. When there is no high resolution time available, this returns an Instant equivalent with getMissionTime()
    • getSpeed

      default double getSpeed()
      If the time service is a simulated time, this gives the relation between the (simulated) mission time and the wall clock time:
      • 1.0 = realtime speed.
      • >1.0 = faster than realtime
      • <1.0 = slower than realtime.
      Returns:
      the relation between the mission time and the wall clock time