File-By-File
Timestamp

Timestamp

A single point in time. A time can either be provided, or the static method now() can be used to create a timestamp at the current point.

Fields

value

The timestamp's value. Values reported by System.currentTimeMillis() are provided as longs, but they are converted to doubles for this class.

Methods

Timestamp(double value)

Constructs a new Timestamp instance with the specified value. This value typically represents milliseconds since the epoch.

now()

Static factory method. Creates a new Timestamp based on the current time in milliseconds, obtained from Time.ms().

difference(Timestamp a, Timestamp b)

Static method. Calculates the difference between two timestamps. The value is calculated by subtracting the value of timestamp a from the value of timestamp b.

value()

Returns the Timestamp's value as a double.

longValue()

Returns the Timestamp's value as a long.

toString()

Converts the Timestamp's value to a string representation.