API Documentation

for 0.0.1
Show:

NTP Class

The NTP class provides methods to control time synchronization related operations.

Constructor

NTP

()

Example:

//TODO

Methods

getDateTime

() Number

Gets the current Time object underlying Date Object time

Returns:

Number:

the current Date Object raw getTime() result

getDelta

() Number

Get the current timeDelta (difference of time between 2 frames) at the current timeScale

Returns:

Number:

the current timeDelta at the current timeScale

getTime

() Number

Gets the current Time object's time

Returns:

Number:

the current time

getTimeScale

() Number

Get the current timeScale

Returns:

Number:

scale

getTimeSmooth

() Number

Gets a smoothed time, useful to avoid hard transitions when time passed faster than the computing time.

Returns:

Number:

the current time smoothed with an offset

resync

()

Resync the current Time object with the given ntp server

setTimeScale

(
  • scale
)

Set the current timeScale, useful to slower time down

Parameters:

  • scale Number

setup

()

Setup for this time instance

update

()

updates this time instance