TimeService service
#
Instanciating the serviceLoad the following scripts:
You can then get an instance of the service with code similar to:
Then the developer can use _timeManager as TimeService service instance.
This service implements the Time interface.
#
CallbackReason enumeration#
TimeInfo dictionnary#
TimeObserver callback object#
Creating a TimeObserver objectUse code similar to:
#
Methods// info: TimeInfo
callback(info)
Resolves with void
Rejects with void
#
Time Interface#
Methods  addObserver get getElapsedRealTime removeObserver set setTimezone
// reason: CallbackReason
// observer: TimeObserver
addObserver(reason, observer)
Resolves with void
Rejects with void
get()
Resolves with Date
Rejects with void
getElapsedRealTime()
Resolves with integer
Rejects with void
// reason: CallbackReason
// observer: TimeObserver
removeObserver(reason, observer)
Resolves with void
Rejects with void
// time: Date
set(time)
Resolves with void
Rejects with void
// timezone: string
setTimezone(timezone)
Resolves with void
Rejects with void
#
Events  TIME_CHANGED TIMEZONE_CHANGED
The TIME_CHANGED event emits a void
To manage this event, use code similar to:
The TIMEZONE_CHANGED event emits a void
To manage this event, use code similar to: