diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1997-10-05 16:26:04 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1997-10-05 16:26:04 +0000 |
commit | e8ee2f324c3d88b304a0139ee2837823d87a656a (patch) | |
tree | a5776eac9165d8e197e469b44d80d13994e11291 /cpukit/posix/src | |
parent | fixed typo (diff) | |
download | rtems-e8ee2f324c3d88b304a0139ee2837823d87a656a.tar.bz2 |
If the specified time period is less than a clock tick, then
it is arbitrarily assumed to be 1 clock tick.
Diffstat (limited to 'cpukit/posix/src')
-rw-r--r-- | cpukit/posix/src/time.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cpukit/posix/src/time.c b/cpukit/posix/src/time.c index acb4b507b1..a14eb71f8e 100644 --- a/cpukit/posix/src/time.c +++ b/cpukit/posix/src/time.c @@ -62,7 +62,10 @@ Watchdog_Interval _POSIX_Timespec_to_interval( ticks += (time->tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND) / _TOD_Microseconds_per_tick; - return ticks; + if (ticks) + return ticks; + + return 1; } /*PAGE |