summaryrefslogtreecommitdiff
path: root/pjlib
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2008-10-01 09:02:12 +0000
committerBenny Prijono <bennylp@teluu.com>2008-10-01 09:02:12 +0000
commit87609ca9a8c6c621b2aa9045f94fc7ef676e4968 (patch)
tree1d53330334a485896121eae0b2b90a599c7a49c6 /pjlib
parent4c74ad6ec03843bcffd3046de35155fe5bde8e48 (diff)
Ticket #650: Unit test failure in the timestamp test on very fast CPU (thanks Seth Hinze for the patch)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2336 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib')
-rw-r--r--pjlib/src/pjlib-test/timestamp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pjlib/src/pjlib-test/timestamp.c b/pjlib/src/pjlib-test/timestamp.c
index 866aa45c..bb87ad11 100644
--- a/pjlib/src/pjlib-test/timestamp.c
+++ b/pjlib/src/pjlib-test/timestamp.c
@@ -51,7 +51,7 @@ static int timestamp_accuracy()
{
pj_timestamp freq, t1, t2;
pj_time_val tv1, tv2, tvtmp;
- pj_uint32_t msec, tics;
+ pj_int64_t msec, tics;
pj_int64_t diff;
PJ_LOG(3,(THIS_FILE, "...testing frequency accuracy (pls wait)"));
@@ -65,7 +65,7 @@ static int timestamp_accuracy()
} while (PJ_TIME_VAL_EQ(tvtmp, tv1));
pj_get_timestamp(&t1);
- /* Sleep for 5 seconds */
+ /* Sleep for 10 seconds */
pj_thread_sleep(10000);
/* Get end time */
@@ -80,7 +80,7 @@ static int timestamp_accuracy()
msec = PJ_TIME_VAL_MSEC(tv2);
/* Check that the frequency match the elapsed time */
- tics = (unsigned)(t2.u64 - t1.u64);
+ tics = t2.u64 - t1.u64;
diff = tics - (msec * freq.u64 / 1000);
if (diff < 0)
diff = -diff;