diff options
author | Christopher Faylor <me@cgf.cx> | 2006-02-11 00:06:50 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2006-02-11 00:06:50 +0000 |
commit | 7f8c7bff6f026e405860c92359d979736e00fca6 (patch) | |
tree | 327d25a227af01cbe15daed3aedca7768d7ac09c /winsup/cygwin/times.cc | |
parent | 9a08fd5a50ae8a34abe8db0b8983d86d74491665 (diff) | |
download | cygnal-7f8c7bff6f026e405860c92359d979736e00fca6.tar.gz cygnal-7f8c7bff6f026e405860c92359d979736e00fca6.tar.bz2 cygnal-7f8c7bff6f026e405860c92359d979736e00fca6.zip |
* times.cc (clock_getres): Use correct conversion from milliseconds to
seconds/nanoseconds.
(clock_setres): Use correct conversion to nanoseconds.
Diffstat (limited to 'winsup/cygwin/times.cc')
-rw-r--r-- | winsup/cygwin/times.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/winsup/cygwin/times.cc b/winsup/cygwin/times.cc index ba387bfd6..3922caf31 100644 --- a/winsup/cygwin/times.cc +++ b/winsup/cygwin/times.cc @@ -711,8 +711,8 @@ clock_getres (clockid_t clk_id, struct timespec *tp) DWORD period = gtod.resolution (); - tp->tv_sec = period / 1000000; - tp->tv_nsec = (period % 1000000) * 1000; + tp->tv_sec = period / 1000; + tp->tv_nsec = (period % 1000) * 1000000; return 0; } @@ -730,7 +730,7 @@ clock_setres (clockid_t clk_id, struct timespec *tp) if (period_set) timeEndPeriod (minperiod); - DWORD period = (tp->tv_sec * 1000) + ((tp->tv_nsec) / 1000); + DWORD period = (tp->tv_sec * 1000) + ((tp->tv_nsec) / 1000000); if (timeBeginPeriod (period)) { |