001// Copyright (c) FIRST and other WPILib contributors.
002// Open Source Software; you can modify and/or share it under the terms of
003// the WPILib BSD license file in the root directory of this project.
004
005package org.wpilib.networktables;
006
007/**
008 * NetworkTables timestamped object.
009 *
010 * @param <T> Value type.
011 */
012public final class TimestampedObject<T> {
013  /**
014   * Create a timestamped value.
015   *
016   * @param timestamp timestamp in local time base
017   * @param serverTime timestamp in server time base
018   * @param value value
019   */
020  public TimestampedObject(long timestamp, long serverTime, T value) {
021    this.timestamp = timestamp;
022    this.serverTime = serverTime;
023    this.value = value;
024  }
025
026  /** Timestamp in local time base. */
027  public final long timestamp;
028
029  /** Timestamp in server time base. May be 0 or 1 for locally set values. */
030  public final long serverTime;
031
032  /** Value. */
033  public final T value;
034}