[Change] Some minor clean up.

This commit is contained in:
Allanis 2014-04-10 18:23:54 +01:00
parent a17b7792f3
commit 69ad2fd3bb

View File

@ -71,14 +71,16 @@ void rng_init(void) {
static uint32_t rng_timeEntropy(void) {
int i;
#ifdef WIN32
#if defined(_POSIX_SOURCE)
struct timeval tv;
gettimeofday(&tv, NULL);
i = tv.tv_sec * 1000000 + tv.tv_usec;
#elif defined(WIN32)
struct _timeb tb;
_ftime(&tb);
i = tb.time * 1000 + tb.millitm;
#else
struct timeval tv;
gettimeofday(&tv, NULL);
i = tv.tv_sec * 1000000 + tv.tv_usec;
#error "Needs Implmentation."
#endif
return i;
}