Esempio n. 1
0
        public void SetInterval(long nsec)
        {
            var tm = new timespec
            {
                tv_sec  = (int)(nsec / 1_000_000_000L),
                tv_nsec = (int)(nsec % 1_000_000_000L)
            };
            var newValue = new itimerspec
            {
                it_value    = tm,
                it_interval = tm
            };

            Interops.timerfd_settime(this.Identity, 0, ref newValue, out var dummy);
        }
Esempio n. 2
0
 public static extern int timerfd_settime(
     int fd, int flags,
     ref itimerspec new_value,
     out itimerspec old_value);