Update tests base

This commit is contained in:
Gregory Lirent 2022-06-03 11:54:22 +03:00
parent 8ed7159655
commit ee602d91b9
2 changed files with 4 additions and 1 deletions

View File

@ -9,6 +9,7 @@
static void init(unsigned int seed) {
if (!seed) seed = time(0);
printf("\e[36mRandom module initialized with seed: \e[m\e[32m%u\n\e[m", seed);
put_separator();
srand(seed);
@ -16,7 +17,7 @@ static void init(unsigned int seed) {
int random_init(int argc, char** argv) {
if (argc < 2) {
init(time(0));
init(0);
} else init(atol(argv[1]));
return 0;

View File

@ -3,7 +3,9 @@
#include <stdlib.h>
#include <string.h>
#ifndef __USE_MISC
#define __USE_MISC
#endif
#include <unistd.h>
#include <sys/resource.h>
#include <sys/times.h>