X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=file_write.c;fp=file_write.c;h=3f764766c39964a2f2736415a27cf56c4bad74ec;hp=a12867d5d24830e0b9b2050aff957a42eff3cbf0;hb=24758c5f17064273786e704b84ceff56c234e347;hpb=01f8023b7fe59abc29072c7b84caec5961f8f14b diff --git a/file_write.c b/file_write.c index a12867d5..3f764766 100644 --- a/file_write.c +++ b/file_write.c @@ -8,7 +8,6 @@ #include #include -#include #include "para.h" #include "list.h" @@ -38,10 +37,8 @@ struct private_file_write_data { __must_check __malloc static char *random_filename(void) { char *result, *home = para_homedir(); - struct timeval tv; - gettimeofday(&tv, NULL); - srandom(tv.tv_usec); + srandom(clock_get_realtime(NULL)->tv_usec); result = make_message("%s/.paraslash/%08lu", home, para_random(99999999)); free(home);