v/rand/rand.v

15 lines
174 B
Coq
Raw Normal View History

2019-06-22 20:20:28 +02:00
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
}