succ()
public
Returns a new Time object, one second later than time. Time#succ is obsolete since 1.9.2 for time is
not a discrete value.
t = Time.now
t.succ
Use instead time + 1
t + 1
Show source
VALUE
rb_time_succ(VALUE time)
{
struct time_object *tobj;
struct time_object *tobj2;
rb_warn("Time#succ is obsolete; use time + 1");
GetTimeval(time, tobj);
time = time_new_timew(rb_cTime, wadd(tobj->timew, WINT2FIXWV(TIME_SCALE)));
GetTimeval(time, tobj2);
TIME_COPY_GMT(tobj2, tobj);
return time;
}