A superdense time instant, represented as a time value time (i.e., time elapsed since Epoch) paired with a microstep index to keep track of iterations in superdense time. For each such iteration, time remains the same, but microstep is incremented.

Constructors

  • Create a new tag using a time value and a microstep.

    Parameters

    • timeSinceEpoch: TimeValue

      Time elapsed since Epoch.

    • microstep: number = 0

      Superdense time index.

    Returns Tag

Properties

microstep: number = 0

Superdense time index.

time: TimeValue

Time elapsed since Epoch.

Methods

  • Get a new time instant that represents this time instant plus the given delay. The microstep of this time instant is ignored; the returned time instant has a microstep of zero if the delay is greater than zero. If the delay equals zero or is undefined, the tag is returned unchanged with its current microstep.

    Parameters

    • delay: undefined | TimeValue

      The time interval to add to this time instant.

    Returns Tag

  • Get a new time instant that has the same time but n microsteps later.

    Parameters

    • n: number

    Returns Tag

  • Obtain a time interval that represents the absolute (i.e., positive) time difference between this time interval and the tag given as a parameter.

    Parameters

    • other: Tag

      The time instant for which to compute the absolute difference with this time instant.

    Returns TimeValue

  • Return true if the tag is greater than the tag given as a parameter.

    Parameters

    • other: Tag

      The time instant to compare against this one.

    Returns boolean

  • Return true if the tag is greater than or equal to the tag given as a parameter.

    Parameters

    • other: Tag

      The time instant to compare against this one.

    Returns boolean

  • Return true if this tag is simultaneous with the tag given as a parameter, false otherwise. Both time and microstep must be equal for two tags to be simultaneous.

    Parameters

    • other: Tag

      The time instant to compare against this one.

    Returns boolean

  • Return true if this time instant is earlier than the tag given as a parameter, false otherwise. For two tags with an equal time, one instant is earlier than the other if its microstep is less than the microstep of the other.

    Parameters

    • other: Tag

      The time instant to compare against this one.

    Returns boolean

  • Return true if the tag is smaller than or equal to the tag given as a parameter.

    Parameters

    • other: Tag

      The time instant to compare against this one.

    Returns boolean

  • Get a 12-byte buffer for the tag. Used by federates.

    Returns Buffer

  • Return a human-readable string presentation of this time instant.

    Returns string

  • Create a Tag from 8-byte TimeValue and 4-byte microstep in a buffer.

    Parameters

    • buffer: Buffer

      A buffer of TimeValue and microstep.

    Returns Tag