public class ClockUtil extends Object
System.nanoTime()
reflects the system uptime without system sleep times. Android devices, which
want to use californium timer's (e.g. auto resumption or deduplication) in
sleep times, must set their handler and provide the proper expired
nanoseconds. This will not wake up any californium timer in time, but it
expires them on then next wake up. Not used for schedule timed of schedule
timer e.g. ExecutorsUtil.| Modifier and Type | Class and Description |
|---|---|
static interface |
ClockUtil.Realtime
Handler to return the expired realtime in nanoseconds.
|
| Constructor and Description |
|---|
ClockUtil() |
| Modifier and Type | Method and Description |
|---|---|
static long |
nanoRealtime()
Get expired realtime in nanoseconds.
|
static void |
setRealtimeHandler(ClockUtil.Realtime systemHandler)
Set handler system specific expired realtime in nanoseconds.
|
public static void setRealtimeHandler(ClockUtil.Realtime systemHandler)
systemHandler - system specific expired realtime in nanoseconds.NullPointerException - if systemHandler is nullpublic static long nanoRealtime()
System.nanoTime() is used.Copyright © 2019 Eclipse Foundation. All rights reserved.