Commit a9a91c35 authored by Yukihiro Matsumoto's avatar Yukihiro Matsumoto

Time.at should take optional second argument

parent 3de8c444
......@@ -227,9 +227,10 @@ mrb_time_now(mrb_state *mrb, mrb_value self)
static mrb_value
mrb_time_at(mrb_state *mrb, mrb_value self)
{
mrb_float f;
mrb_float f, f2 = 0;
mrb_get_args(mrb, "f", &f);
mrb_get_args(mrb, "f|f", &f, &f2);
f += f2 * 1e-6;
return mrb_time_make(mrb, mrb_class_ptr(self), f, MRB_TIMEZONE_LOCAL);
}
......
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