summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-01-06 22:11:24 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-01-06 22:11:24 +0000
commitc726fcf4eb23204be5977a47b43e46434d41e709 (patch)
treee2524e8189f2eddc31d33bc486f1a660f2858afb
parent0f7983275234851811ae4a61fa8f835a140f6c4a (diff)
downloadATCD-c726fcf4eb23204be5977a47b43e46434d41e709.tar.gz
(nanosleep): convert nanoseconds to microseconds by dividing by 1000,
not multiplying.
-rw-r--r--ace/OS.i8
1 files changed, 4 insertions, 4 deletions
diff --git a/ace/OS.i b/ace/OS.i
index 6eea88e7def..dec0596bdfe 100644
--- a/ace/OS.i
+++ b/ace/OS.i
@@ -244,11 +244,11 @@ ACE_Time_Value::operator timespec_t () const
timespec_t tv;
#if ! defined(ACE_HAS_BROKEN_TIMESPEC_MEMBERS)
tv.tv_sec = this->tv_.tv_sec;
- // Convert nanoseconds into microseconds.
+ // Convert microseconds into nanoseconds.
tv.tv_nsec = this->tv_.tv_usec * 1000;
#else
tv.ts_sec = this->tv_.tv_sec;
- // Convert nanoseconds into microseconds.
+ // Convert microseconds into nanoseconds.
tv.ts_nsec = this->tv_.tv_usec * 1000;
#endif /* ACE_HAS_BROKEN_TIMESPEC_MEMBERS */
return tv;
@@ -7743,10 +7743,10 @@ ACE_OS::nanosleep (const struct timespec *requested,
// Convert into seconds and microseconds.
#if ! defined(ACE_HAS_BROKEN_TIMESPEC_MEMBERS)
ACE_Time_Value tv (requested->tv_sec,
- requested->tv_nsec * 1000);
+ requested->tv_nsec / 1000);
#else
ACE_Time_Value tv (requested->ts_sec,
- requested->ts_nsec * 1000);
+ requested->ts_nsec / 1000);
#endif /* ACE_HAS_BROKEN_TIMESPEC_MEMBERS */
return ACE_OS::sleep (tv);
#endif /* ACE_HAS_CLOCK_GETTIME */