summaryrefslogtreecommitdiff
path: root/src/main/java/core/time/VSTime.java
blob: 20806d6567cf2e777028df3ce54ffddb8956a5e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package core.time;

/**
 * Interface for time representations in the distributed simulator.
 * This interface provides a common contract for different time implementations
 * including Lamport logical time and vector clocks.
 * 
 * <p>All time implementations must track the global simulation time
 * and provide a string representation for display purposes.</p>
 *
 * @see VSLamportTime
 * @see VSVectorTime
 * @author Paul C. Buetow
 */
public interface VSTime {
    /**
     * Gets the global simulation time when this time value was recorded.
     * This allows correlation between logical time and simulation time.
     *
     * @return the global simulation time in milliseconds
     */
    public long getGlobalTime();

    /**
     * Returns a string representation of this time value.
     * The format depends on the specific time implementation.
     *
     * @return string representation suitable for display or logging
     */
    public String toString();
}