Class: Timestamp

Timestamp(time, nanos)

Class representing an Ignite timestamp type.

The timestamp extends the standard JavaScript Date Object and consists of:

  • time - the number of milliseconds since January 1, 1970, 00:00:00 UTC, methods of the JavaScript Date Object can be used to operate with the time.
  • nanoseconds - fraction of the last millisecond in the range from 0 to 999999 nanoseconds, this class specifies additional methods to operate with the nanoseconds.

Constructor

new Timestamp(time, nanos)

Public constructor.

Parameters:
Name Type Description
time number

integer value representing the number of milliseconds since January 1, 1970, 00:00:00 UTC.

nanos number

integer value representing the nanoseconds of the last millisecond, should be in the range from 0 to 999999.

Source:

Extends

  • Date

Methods

getNanos() → {number}

Returns the nanoseconds of the last millisecond from the timestamp.

Source:
Returns:
  • nanoseconds of the last millisecond.
Type
number

setNanos(nanos) → {Timestamp}

Updates the nanoseconds of the last millisecond in the timestamp.

Parameters:
Name Type Description
nanos number

new value for the nanoseconds of the last millisecond, should be in the range from 0 to 999999.

Source:
Throws:

if error.

Type
IgniteClientError
Returns:
  • the same instance of Timestamp
Type
Timestamp