using System.Runtime.InteropServices; namespace Brutal.NotCursesApi; /// /// Blittable mirror of POSIX struct timespec. notcurses uses it for input timeouts /// (, , fade durations). /// /// /// The layout (two s, 16 bytes total) matches Linux/macOS exactly: there /// time_t and long tv_nsec are both 8 bytes. On Windows-MinGW tv_nsec is /// 4 bytes natively followed by 4 bytes of struct padding; input values whose nanoseconds fit /// in 32 bits (true for every valid nanosecond) marshal correctly because the low 32 bits land /// in the right slot. notcurses uses const struct timespec* exclusively (input-only), /// so the high 32 bits of are ignored by the native side. /// [StructLayout(LayoutKind.Sequential)] public struct TimeSpec { /// Seconds (time_t). public long Sec; /// Nanoseconds (long tv_nsec; only the low 32 bits are read on Windows-MinGW). public long Nsec; }