+(p1)
public
Addition — Adds some number of seconds (possibly fractional) to
time and returns that value as a new Time object.
t = Time.now
t + (60 * 60 * 24)
Show source
static VALUE
time_plus(VALUE time1, VALUE time2)
{
struct time_object *tobj;
GetTimeval(time1, tobj);
if (IsTimeval(time2)) {
rb_raise(rb_eTypeError, "time + time?");
}
return time_add(tobj, time2, 1);
}