Class TimeViolationError

  • All Implemented Interfaces:
    java.io.Serializable

    public class TimeViolationError
    extends java.lang.AssertionError
    The Error shows that some time bounds violation detected during execution.
    Since:
    1.0
    See Also:
    TimeGuard, Serialized Form
    • Field Detail

      • detectedTimeInMilliseconds

        private final long detectedTimeInMilliseconds
    • Constructor Detail

      • TimeViolationError

        public TimeViolationError​(long detectedTimeInMilliseconds,
                                  TimeGuard.TimeData item)
        The Constructor.
        Parameters:
        detectedTimeInMilliseconds - the detected time in milliseconds.
        item - the data container contains registration data for time watcher
        Since:
        1.0
    • Method Detail

      • getDetectedViolationInMilliseconds

        public long getDetectedViolationInMilliseconds()
        Get the difference between the expected max time and the detected time.
        Returns:
        difference in milliseconds between max time and detected time
        Since:
        1.0
      • getDetectedTimeInMilliseconds

        public long getDetectedTimeInMilliseconds()
        Get the detected time in milliseconds.
        Returns:
        the detected time in milliseconds
        Since:
        1.0
      • getData

        public TimeGuard.TimeData getData()
        Get the data container which was created during time watcher registration.
        Returns:
        the data container contains data for time watcher