refine dummy current_time to avoid infinit waiting loop

This commit is contained in:
Takashi Kojo
2017-11-27 09:03:50 +09:00
parent a3b2817036
commit 4cd39b4bfb

View File

@@ -62,6 +62,12 @@ double current_time(int reset)
#else #else
double current_time(int reset) { return 0.0 ; } /* dummy */
double current_time(int reset) {
static double t;
t += 1.0; /* for avoid infinit loop of waiting time */
if(reset)t = 0.0;
return t ;
}
#endif #endif