Package ej.wasi.io.event
Class SubscriptionClock
- java.lang.Object
-
- ej.wasi.io.event.Subscription
-
- ej.wasi.io.event.SubscriptionClock
-
public class SubscriptionClock extends Subscription
A clock event subscription
-
-
Field Summary
-
Fields inherited from class ej.wasi.io.event.Subscription
CLOCK, FD_READ, FD_WRITE
-
-
Constructor Summary
Constructors Constructor Description SubscriptionClock(long userdata, byte[] memory, int ptr)Creates a new clock event subscription instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetId()Gets the clock id.longgetPrecision()Gets the timeout precision, i.e.longgetTimeout()Gets the timeout.booleanisAbsoluteTimeout()Checks whether the timeout is absolute or relative.-
Methods inherited from class ej.wasi.io.event.Subscription
deserialize, getUserData
-
-
-
-
Constructor Detail
-
SubscriptionClock
public SubscriptionClock(long userdata, byte[] memory, int ptr)Creates a new clock event subscription instance.- Parameters:
userdata- the user data.memory- the memory from which to read the clock event subscription content.ptr- the start pointer in the memory.
-
-
Method Detail
-
getId
public int getId()
Gets the clock id.- Returns:
- the clock id.
-
getPrecision
public long getPrecision()
Gets the timeout precision, i.e. the amount of time that the implementation may wait additionally to coalesce with other events.- Returns:
- the timeout precision.
-
isAbsoluteTimeout
public boolean isAbsoluteTimeout()
Checks whether the timeout is absolute or relative.- Returns:
trueif the timeout is absolute; false otherwise.
-
getTimeout
public long getTimeout()
Gets the timeout.- Returns:
- the timeout.
-
-