diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-03-03 12:01:49 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-03-03 12:01:49 +0900 |
| commit | 2be1a9c3c7806059a4b2ff20154c2fe0b43f530b (patch) | |
| tree | 24c03d05382c9642b3a9e85f1f0a6e1456ae4fee | |
| parent | 42afafbd236a7839fefacac7b1b6b885bd7acbc9 (diff) | |
| download | mruby-2be1a9c3c7806059a4b2ff20154c2fe0b43f530b.tar.gz mruby-2be1a9c3c7806059a4b2ff20154c2fe0b43f530b.zip | |
time.c: `timespec_get()` never fails.
| -rw-r--r-- | mrbgems/mruby-time/src/time.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/mrbgems/mruby-time/src/time.c b/mrbgems/mruby-time/src/time.c index 63d2f1c5b..dc8a8ef22 100644 --- a/mrbgems/mruby-time/src/time.c +++ b/mrbgems/mruby-time/src/time.c @@ -379,9 +379,7 @@ current_mrb_time(mrb_state *mrb) #if defined(TIME_UTC) && !defined(__ANDROID__) { struct timespec ts; - if (timespec_get(&ts, TIME_UTC) == 0) { - mrb_raise(mrb, E_RUNTIME_ERROR, "timespec_get() failed for unknown reasons"); - } + timespec_get(&ts, TIME_UTC); sec = ts.tv_sec; usec = ts.tv_nsec / 1000; } |
