summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2018-07-02 23:21:06 -0400
committerJaron Kent-Dobias <jaron@kent-dobias.com>2018-07-02 23:21:06 -0400
commit45faadfe2ddd0361d0268f836529c25e11f333b4 (patch)
tree7e27117236253a80ed03c910cd3b40d6b041e54c /src
parenta1c120ba49f2727dd5b42ad53444439b87232e25 (diff)
downloadc++-45faadfe2ddd0361d0268f836529c25e11f333b4.tar.gz
c++-45faadfe2ddd0361d0268f836529c25e11f333b4.tar.bz2
c++-45faadfe2ddd0361d0268f836529c25e11f333b4.zip
timestamp is now in nanoseconds to prevent collision
Diffstat (limited to 'src')
-rw-r--r--src/wolff_finite.c8
1 files changed, 7 insertions, 1 deletions
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");