Class timespec

java.lang.Object
com.github.elebras1.flecs.timespec

public class timespec extends Object
struct timespec {
    __time_t tv_sec;
    __syscall_slong_t tv_nsec;
}
  • Method Details

    • layout

      public static final GroupLayout layout()
      The layout of this struct
    • tv_sec$layout

      public static final ValueLayout.OfLong 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

      public static long tv_sec(MemorySegment struct)
      Getter for field:
      __time_t tv_sec
      
    • tv_sec

      public static void tv_sec(MemorySegment struct, long fieldValue)
      Setter for field:
      __time_t tv_sec
      
    • tv_nsec$layout

      public static final ValueLayout.OfLong 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

      public static long tv_nsec(MemorySegment struct)
      Getter for field:
      __syscall_slong_t tv_nsec
      
    • tv_nsec

      public static void tv_nsec(MemorySegment struct, long fieldValue)
      Setter for field:
      __syscall_slong_t tv_nsec
      
    • asSlice

      public static MemorySegment asSlice(MemorySegment array, long index)
      Obtains a slice of arrayParam which selects the array element at index. The returned segment has address arrayParam.address() + index * layout().byteSize()
    • sizeof

      public static long sizeof()
      The size (in bytes) of this struct
    • allocate

      public static MemorySegment allocate(SegmentAllocator allocator)
      Allocate a segment of size layout().byteSize() using allocator
    • allocateArray

      public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator)
      Allocate an array of size elementCount using allocator. The returned segment has size elementCount * layout().byteSize().
    • reinterpret

      public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer<MemorySegment> cleanup)
      Reinterprets addr using target arena and cleanupAction (if any). The returned segment has size layout().byteSize()
    • reinterpret

      public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer<MemorySegment> cleanup)
      Reinterprets addr using target arena and cleanupAction (if any). The returned segment has size elementCount * layout().byteSize()