From 45faadfe2ddd0361d0268f836529c25e11f333b4 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Mon, 2 Jul 2018 23:21:06 -0400 Subject: timestamp is now in nanoseconds to prevent collision --- src/wolff_finite.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/wolff_finite.c b/src/wolff_finite.c index 5f56015..9b3e21e 100644 --- a/src/wolff_finite.c +++ b/src/wolff_finite.c @@ -89,7 +89,13 @@ int main(int argc, char *argv[]) { gsl_rng *r = gsl_rng_alloc(gsl_rng_mt19937); gsl_rng_set(r, rand_seed()); - unsigned long timestamp = (unsigned long)time(NULL); + unsigned long timestamp; + + { + struct timespec spec; + clock_gettime(CLOCK_REALTIME, &spec); + timestamp = spec.tv_sec*1000000000LL + spec.tv_nsec; + } FILE *outfile_info = fopen("wolff_metadata.txt", "a"); -- cgit v1.2.3-70-g09d2