@@ -77,6 +77,11 @@ HL_PRIM rnd *hl_rnd_init_system() {
struct timeval t;
gettimeofday(&t,NULL);
time = t.tv_sec * 1000000 + t.tv_usec;
+#endif
+#ifdef HL_DEBUG_REPRO
+ // fixed random seed
+ time = 4644546;
+ pid = 0;
#endif
hl_rnd_set_seed(r,time ^ (pid | (pid << 16)));
return r;
@@ -181,7 +181,15 @@ HL_PRIM void hl_sys_exit( int code ) {
exit(code);
}
+static double CURT = 0;
+
HL_PRIM double hl_sys_time() {
+ CURT += 0.001;
+ return CURT;
#ifdef HL_WIN
#define EPOCH_DIFF (134774*24*60*60.0)
static double time_diff = 0.;