time.c: `timespec_get()` never fails.

parent 42afafbd
...@@ -379,9 +379,7 @@ current_mrb_time(mrb_state *mrb) ...@@ -379,9 +379,7 @@ current_mrb_time(mrb_state *mrb)
#if defined(TIME_UTC) && !defined(__ANDROID__) #if defined(TIME_UTC) && !defined(__ANDROID__)
{ {
struct timespec ts; struct timespec ts;
if (timespec_get(&ts, TIME_UTC) == 0) { timespec_get(&ts, TIME_UTC);
mrb_raise(mrb, E_RUNTIME_ERROR, "timespec_get() failed for unknown reasons");
}
sec = ts.tv_sec; sec = ts.tv_sec;
usec = ts.tv_nsec / 1000; usec = ts.tv_nsec / 1000;
} }
......
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