summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1997-10-05 16:26:04 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1997-10-05 16:26:04 +0000
commite8ee2f324c3d88b304a0139ee2837823d87a656a (patch)
treea5776eac9165d8e197e469b44d80d13994e11291 /cpukit
parentfixed typo (diff)
downloadrtems-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')
-rw-r--r--cpukit/posix/src/time.c5
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