mirror of https://github.com/YosysHQ/abc.git
Fix MSVC
This commit is contained in:
parent
91e806ffb6
commit
f29fe78731
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
#include <random>
|
||||
#include <climits>
|
||||
#include <iomanip>
|
||||
#include <string>
|
||||
//#include <cstdlib>
|
||||
//#include <cstring>
|
||||
//#include <cstdio>
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue