summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorrpj <rpj>2005-06-12 00:43:14 +0000
committerrpj <rpj>2005-06-12 00:43:14 +0000
commitacce3874f9cc295b1eddc3937f02790deb8c3440 (patch)
tree58a5bfe388b0d1eeb2adbd3b32557f544150f8e2 /tests
parent89004c42739c39f9546cd8c7ef6cfeaf7a838aa3 (diff)
''
Diffstat (limited to 'tests')
-rw-r--r--tests/stress1.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/stress1.c b/tests/stress1.c
index 2562167..efaf445 100644
--- a/tests/stress1.c
+++ b/tests/stress1.c
@@ -105,6 +105,8 @@ enum {
/*
* Returns abstime 'milliseconds' from 'now'.
+ *
+ * Works for: -INT_MAX <= millisecs <= INT_MAX
*/
struct timespec *
millisecondsFromNow (struct timespec * time, int millisecs)
@@ -117,7 +119,7 @@ millisecondsFromNow (struct timespec * time, int millisecs)
/* get current system time and add millisecs */
_ftime(&currSysTime);
- secs = (int64_t)(currSysTime.time + (millisecs / 1000));
+ secs = (int64_t)(currSysTime.time) + (millisecs / 1000);
nanosecs = ((int64_t) (millisecs%1000 + currSysTime.millitm)) * NANOSEC_PER_MILLISEC;
if (nanosecs >= NANOSEC_PER_SEC)
{