summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrantišek Dvořák <valtri@civ.zcu.cz>2010-10-30 11:43:11 +0200
committerFrantišek Dvořák <valtri@civ.zcu.cz>2010-10-30 11:43:11 +0200
commit9053a072c0edc3e45adc4131bb6eb8b0614eb6af (patch)
tree4ef199cbacef56f2b6be5a9d23203a525df2b022
parent3a70a11d2871085ef8dcffdc81e3865c134de4d7 (diff)
downloadxine-lib-9053a072c0edc3e45adc4131bb6eb8b0614eb6af.tar.gz
xine-lib-9053a072c0edc3e45adc4131bb6eb8b0614eb6af.tar.bz2
Try to meassure memcpy method speed by clock() when times() not available.
-rw-r--r--src/xine-utils/memcpy.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/xine-utils/memcpy.c b/src/xine-utils/memcpy.c
index b6836aebc..9056749e2 100644
--- a/src/xine-utils/memcpy.c
+++ b/src/xine-utils/memcpy.c
@@ -39,6 +39,8 @@
#ifdef HAVE_SYS_TIMES_H
#include <sys/times.h>
+#else
+#include <time.h>
#endif
#include <stdlib.h>
@@ -429,7 +431,7 @@ static uint64_t rdtsc(int config_flags)
struct tms tp;
return times(&tp);
#else
- return ((uint64_t)0);
+ return clock();
#endif /* HAVE_SYS_TIMES_H */
}
#endif