Package org.freedesktop.wayland.raw
Class timespec
java.lang.Object
org.freedesktop.wayland.raw.timespec
struct timespec {
__time_t tv_sec;
__syscall_slong_t tv_nsec;
}
-
Method Summary
Modifier and TypeMethodDescriptionstatic MemorySegmentallocate(SegmentAllocator allocator) Allocate a segment of sizelayout().byteSize()usingallocatorstatic MemorySegmentallocateArray(long elementCount, SegmentAllocator allocator) Allocate an array of sizeelementCountusingallocator.static MemorySegmentasSlice(MemorySegment array, long index) Obtains a slice ofarrayParamwhich selects the array element atindex.static final GroupLayoutlayout()The layout of this structstatic MemorySegmentreinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddrusing targetarenaandcleanupAction(if any).static MemorySegmentreinterpret(MemorySegment addr, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddrusing targetarenaandcleanupAction(if any).static longsizeof()The size (in bytes) of this structstatic longtv_nsec(MemorySegment struct) Getter for field:__syscall_slong_t tv_nsecstatic voidtv_nsec(MemorySegment struct, long fieldValue) Setter for field:__syscall_slong_t tv_nsecstatic final ValueLayout.OfLongLayout for field:__syscall_slong_t tv_nsecstatic final longOffset for field:__syscall_slong_t tv_nsecstatic longtv_sec(MemorySegment struct) Getter for field:__time_t tv_secstatic voidtv_sec(MemorySegment struct, long fieldValue) Setter for field:__time_t tv_secstatic final ValueLayout.OfLongLayout for field:__time_t tv_secstatic final longOffset for field:__time_t tv_sec
-
Method Details
-
layout
The layout of this struct -
tv_sec$layout
Layout for field:__time_t tv_sec -
tv_sec$offset
public static final long tv_sec$offset()Offset for field:__time_t tv_sec -
tv_sec
Getter for field:__time_t tv_sec -
tv_sec
Setter for field:__time_t tv_sec -
tv_nsec$layout
Layout for field:__syscall_slong_t tv_nsec -
tv_nsec$offset
public static final long tv_nsec$offset()Offset for field:__syscall_slong_t tv_nsec -
tv_nsec
Getter for field:__syscall_slong_t tv_nsec -
tv_nsec
Setter for field:__syscall_slong_t tv_nsec -
asSlice
Obtains a slice ofarrayParamwhich selects the array element atindex. The returned segment has addressarrayParam.address() + index * layout().byteSize() -
sizeof
public static long sizeof()The size (in bytes) of this struct -
allocate
Allocate a segment of sizelayout().byteSize()usingallocator -
allocateArray
Allocate an array of sizeelementCountusingallocator. The returned segment has sizeelementCount * layout().byteSize(). -
reinterpret
public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddrusing targetarenaandcleanupAction(if any). The returned segment has sizelayout().byteSize() -
reinterpret
public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddrusing targetarenaandcleanupAction(if any). The returned segment has sizeelementCount * layout().byteSize()
-