diff --git a/src/base/random/cl_random_from.cc b/src/base/random/cl_random_from.cc index 0470a4e..e858473 100644 --- a/src/base/random/cl_random_from.cc +++ b/src/base/random/cl_random_from.cc @@ -1,4 +1,7 @@ // random_state constructor. +#if defined(_WIN32) +#include // for GetCurrentProcessId() +#endif // General includes. #include "cl_sysdep.h" @@ -9,10 +12,6 @@ #include "cln/random.h" // Implementation. -#if defined(_WIN32) -#include // for GetCurrentProcessId() -#endif - #include "cl_base_config.h" #include "cl_low.h" #include // declares rand() @@ -47,14 +46,12 @@ #endif #include extern "C" clock_t times (struct tms * buffer); -namespace cln { inline uint32 get_seed (void) { var struct tms tmsbuf; var uint32 seed_lo = times(&tmsbuf); return seed_lo + tmsbuf.tms_utime + tmsbuf.tms_stime; } -} // namespace cln #endif @@ -62,14 +59,12 @@ #elif defined(_WIN32) #include #include -namespace cln { inline uint32 get_seed (void) { struct timeb timebuf; ftime(&timebuf); return cln::highlow32(timebuf.time, (long)(timebuf.millitm)*1000); } -} // namespace cln #endif