mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Fixed a bug in mruby-time with NO_GETTIMEOFDAT.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user