summaryrefslogtreecommitdiff
path: root/libavutil/des.c
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2012-06-20 01:34:38 +0100
committerMans Rullgard <mans@mansr.com>2012-06-20 17:09:03 +0100
commit980f81d961e62dd38b9dbe6091e72638d6535ccd (patch)
tree1332a4e218a48c11998fd7e44a070d47e88e6961 /libavutil/des.c
parentae0a301668da542eaf8855e5dd61d0728181b0dd (diff)
Use av_gettime() in various places
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavutil/des.c')
-rw-r--r--libavutil/des.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libavutil/des.c b/libavutil/des.c
index d65760e575..c7c6f1dbee 100644
--- a/libavutil/des.c
+++ b/libavutil/des.c
@@ -342,7 +342,7 @@ void av_des_mac(AVDES *d, uint8_t *dst, const uint8_t *src, int count) {
#undef srand
#include <stdlib.h>
#include <stdio.h>
-#include <sys/time.h>
+#include "libavutil/time.h"
static uint64_t rand64(void) {
uint64_t r = rand();
r = (r << 32) | rand();
@@ -389,13 +389,11 @@ int main(void) {
#ifdef GENTABLES
int j;
#endif
- struct timeval tv;
uint64_t key[3];
uint64_t data;
uint64_t ct;
uint64_t roundkeys[16];
- gettimeofday(&tv, NULL);
- srand(tv.tv_sec * 1000 * 1000 + tv.tv_usec);
+ srand(av_gettime());
key[0] = AV_RB64(test_key);
data = AV_RB64(plain);
gen_roundkeys(roundkeys, key[0]);