diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2019-10-10 15:46:10 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2019-10-10 20:46:12 +0900 |
| commit | 529a3369665522ab2083c8c35bbd246800911baf (patch) | |
| tree | b70b813d244389e62eee5db58d467becd5c0aa67 /mrbgems/mruby-time | |
| parent | 78e54904b50635c9d45129569c7901c85f1b6883 (diff) | |
| download | mruby-529a3369665522ab2083c8c35bbd246800911baf.tar.gz mruby-529a3369665522ab2083c8c35bbd246800911baf.zip | |
Fixed a bug in `mruby-time` with `NO_GETTIMEOFDAT`.
Diffstat (limited to 'mrbgems/mruby-time')
| -rw-r--r-- | mrbgems/mruby-time/src/time.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mrbgems/mruby-time/src/time.c b/mrbgems/mruby-time/src/time.c index 418acea18..caa8a01b5 100644 --- a/mrbgems/mruby-time/src/time.c +++ b/mrbgems/mruby-time/src/time.c @@ -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 { |
