summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pjlib/src/pj/os_timestamp_linux.c5
-rw-r--r--pjlib/src/pjlib-test/timestamp.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/pjlib/src/pj/os_timestamp_linux.c b/pjlib/src/pj/os_timestamp_linux.c
index c78fdd61..9d9ae8e5 100644
--- a/pjlib/src/pj/os_timestamp_linux.c
+++ b/pjlib/src/pj/os_timestamp_linux.c
@@ -23,7 +23,10 @@
#include <stdlib.h>
#include <ctype.h>
-#if defined(PJ_HAS_PENTIUM) && PJ_HAS_PENTIUM!=0
+#if defined(PJ_HAS_PENTIUM) && PJ_HAS_PENTIUM!=0 && \
+ defined(PJ_TIMESTAMP_USE_RDTSC) && PJ_TIMESTAMP_USE_RDTSC!=0 && \
+ defined(PJ_M_I386) && PJ_M_I386!=0 && \
+ defined(PJ_LINUX) && PJ_LINUX!=0
static int machine_speed_mhz;
static pj_timestamp machine_speed;
diff --git a/pjlib/src/pjlib-test/timestamp.c b/pjlib/src/pjlib-test/timestamp.c
index 4207d951..48435406 100644
--- a/pjlib/src/pjlib-test/timestamp.c
+++ b/pjlib/src/pjlib-test/timestamp.c
@@ -99,6 +99,9 @@ static int timestamp_accuracy()
"%d msec",
(pj_uint32_t)(diff * 1000000 / freq.u64),
msec));
+ } else {
+ PJ_LOG(3,(THIS_FILE, "....good. Timestamp is accurate down to"
+ " nearest usec."));
}
return 0;