Switch to gettimeofday() for seeding on UNIX

This commit is contained in:
Cameron Gutman
2016-03-31 11:22:06 -04:00
parent 167f41aa2b
commit a602abf244
+5 -1
View File
@@ -79,7 +79,11 @@ enet_deinitialize (void)
enet_uint32
enet_host_random_seed (void)
{
return (enet_uint32) time (NULL);
struct timeval timeVal;
gettimeofday (& timeVal, NULL);
return (timeVal.tv_sec * 1000) ^ (timeVal.tv_usec / 1000);
}
enet_uint32