SystemClock
@UnstableApi
class SystemClock : Clock
The standard implementation of Clock, an instance of which is available via DEFAULT.
Summary
Protected constructors |
|---|
Public functions |
|
|---|---|
HandlerWrapper! |
createHandler(Creates a |
Long |
Returns the current time in milliseconds since the Unix Epoch. |
Long |
|
Long |
nanoTime()See |
Unit |
Notifies the clock that the current thread is about to be blocked and won't return until a condition on another thread becomes true. |
Long |
Protected constructors
Public functions
createHandler
fun createHandler(
looper: Looper!,
@UnknownInitialization callback: @UnknownInitialization Handler.Callback?
): HandlerWrapper!
Creates a HandlerWrapper using a specified looper and a specified callback for handling messages.
| See also | |
|---|---|
Handler |
currentTimeMillis
fun currentTimeMillis(): Long
Returns the current time in milliseconds since the Unix Epoch.
| See also | |
|---|---|
currentTimeMillis |
onThreadBlocked
fun onThreadBlocked(): Unit
Notifies the clock that the current thread is about to be blocked and won't return until a condition on another thread becomes true.
Should be a no-op for all non-test cases.