summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
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)
{