This commit is contained in:
Miodrag Milanovic 2025-12-29 09:44:50 +01:00
parent 91e806ffb6
commit f29fe78731
3 changed files with 9 additions and 0 deletions

View File

@ -184,7 +184,11 @@ Gia_Man_t * Gia_ManGenLutCas( Gia_Man_t * p, char * pPermStr, int nVars, int nLu
srand(Seed);
else {
struct timespec ts;
#if defined(_MSC_VER)
timespec_get(&ts, TIME_UTC);
#else
clock_gettime(CLOCK_REALTIME, &ts);
#endif
unsigned int seed = (unsigned int)(ts.tv_sec ^ ts.tv_nsec);
srand(seed);
}

View File

@ -37,6 +37,7 @@
#include <random>
#include <climits>
#include <iomanip>
#include <string>
//#include <cstdlib>
//#include <cstring>
//#include <cstdio>

View File

@ -1085,7 +1085,11 @@ Vec_Wec_t * Exa3_ChooseInputVars( int nVars, int nLuts, int nLutSize, int Seed )
srand(Seed);
else {
struct timespec ts;
#if defined(_MSC_VER)
timespec_get(&ts, TIME_UTC);
#else
clock_gettime(CLOCK_REALTIME, &ts);
#endif
unsigned int seed = (unsigned int)(ts.tv_sec ^ ts.tv_nsec);
srand(seed);
}