mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
15 lines
174 B
V
15 lines
174 B
V
module rand
|
|
|
|
#include <time.h>
|
|
// #include <stdlib.h>
|
|
fn seed() {
|
|
# time_t t;
|
|
# srand((unsigned) time(&t));
|
|
}
|
|
|
|
fn next(max int) int {
|
|
# return rand() % max;
|
|
return 0
|
|
}
|
|
|