/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2015,2016,2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2015,2016,2018,2019,2020,2021, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
#include "seed.h"
-#include <time.h>
+#include <chrono>
#include "gromacs/utility/basedefinitions.h"
#include "gromacs/utility/fatalerror.h"
}
else
{
- std::mt19937_64 prng(time(nullptr));
+ int64_t microsecondsSinceEpoch = std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::system_clock::now().time_since_epoch()).count();
+ std::mt19937_64 prng(microsecondsSinceEpoch);
return makeRandomSeedInternal(prng);
}
}