diff --git a/winsup/cygwin/timerfd.cc b/winsup/cygwin/timerfd.cc index cebb002ed..4f04efd13 100644 --- a/winsup/cygwin/timerfd.cc +++ b/winsup/cygwin/timerfd.cc @@ -495,6 +495,7 @@ timerfd_tracker::gettime (struct itimerspec *curr_value) next_relative_exp -= curr_value->it_value.tv_sec * NS100PERSEC; curr_value->it_value.tv_nsec = next_relative_exp * (NSPERSEC / NS100PERSEC); + curr_value->it_interval = time_spec ().it_interval; leave_critical_section (); ret = 0; } diff --git a/winsup/cygwin/timerfd.h b/winsup/cygwin/timerfd.h index cebd1d9eb..e314579b0 100644 --- a/winsup/cygwin/timerfd.h +++ b/winsup/cygwin/timerfd.h @@ -128,6 +128,7 @@ class timerfd_tracker /* cygheap! */ clock_t get_clockid () const { return tfd_shared->_clockid; } LONG64 get_clock_now () const { return tfd_shared->get_clock_now (); } + struct itimerspec &time_spec () { return tfd_shared->time_spec (); } LONG64 get_exp_ts () const { return tfd_shared->_exp_ts; } LONG64 get_interval () const { return tfd_shared->_interval; } int flags () const { return tfd_shared->flags (); }