aboutsummaryrefslogtreecommitdiff
path: root/std/stdmath.c
diff options
context:
space:
mode:
Diffstat (limited to 'std/stdmath.c')
-rw-r--r--std/stdmath.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/std/stdmath.c b/std/stdmath.c
index c9a91c3..dad292f 100644
--- a/std/stdmath.c
+++ b/std/stdmath.c
@@ -2,10 +2,8 @@
#include <stdlib.h>
#include <time.h>
-int randGen(int min, int max) {
- time_t t;
-
- srand((unsigned) time(&t));
-
- return rand() % (max - min + 1) + min;
+
+long long randGen(long long min, long long max) {
+ srandom((unsigned) time(NULL));
+ return random() % (max - min + 1) + min;
}