Fixed a bug in `mruby-time` with `NO_GETTIMEOFDAT`.

parent 78e54904
......@@ -379,8 +379,8 @@ current_mrb_time(mrb_state *mrb)
static time_t last_sec = 0, last_usec = 0;
sec = time(NULL);
if (tm->sec != last_sec) {
last_sec = tm->sec;
if (sec != last_sec) {
last_sec = sec;
last_usec = 0;
}
else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment