Class WasiTimeOperations
java.lang.Object
ai.tegmentum.wasmtime4j.wasi.AbstractWasiTimeOperations
ai.tegmentum.wasmtime4j.panama.wasi.WasiTimeOperations
public final class WasiTimeOperations
extends ai.tegmentum.wasmtime4j.wasi.AbstractWasiTimeOperations
Panama FFI implementation of WASI time and clock operations.
Provides access to WASI time operations using Panama Foreign Function Interface. Constants,
convenience methods, and static utilities are inherited from AbstractWasiTimeOperations.
- Since:
- 1.0.0
-
Field Summary
Fields inherited from class ai.tegmentum.wasmtime4j.wasi.AbstractWasiTimeOperations
MAX_CLOCK_ID, WASI_CLOCK_MONOTONIC, WASI_CLOCK_PROCESS_CPUTIME_ID, WASI_CLOCK_REALTIME, WASI_CLOCK_THREAD_CPUTIME_ID -
Constructor Summary
ConstructorsConstructorDescriptionWasiTimeOperations(WasiContext wasiContext, SymbolLookup symbolLookup) Creates a new WASI time operations instance. -
Method Summary
Modifier and TypeMethodDescriptionlonggetClockResolution(int clockId) longgetCurrentTime(int clockId, long precision) Methods inherited from class ai.tegmentum.wasmtime4j.wasi.AbstractWasiTimeOperations
convertTime, getClockName, getCurrentTime, getMonotonicTime, getProcessCpuTime, getRealtime, getThreadCpuTime, isClockSupported, validateClockId
-
Constructor Details
-
WasiTimeOperations
public WasiTimeOperations(WasiContext wasiContext, SymbolLookup symbolLookup) throws PanamaException Creates a new WASI time operations instance.- Parameters:
wasiContext- the WASI context to operate withinsymbolLookup- the symbol lookup for native WASI functions- Throws:
PanamaException- if the wasiContext or symbolLookup is null, or if native function lookup fails
-
-
Method Details
-
getClockResolution
public long getClockResolution(int clockId) throws ai.tegmentum.wasmtime4j.exception.WasiException - Specified by:
getClockResolutionin classai.tegmentum.wasmtime4j.wasi.AbstractWasiTimeOperations- Throws:
ai.tegmentum.wasmtime4j.exception.WasiException
-
getCurrentTime
public long getCurrentTime(int clockId, long precision) throws ai.tegmentum.wasmtime4j.exception.WasiException - Specified by:
getCurrentTimein classai.tegmentum.wasmtime4j.wasi.AbstractWasiTimeOperations- Throws:
ai.tegmentum.wasmtime4j.exception.WasiException
-