eql?(p1)
public
Return true if time and other_time are both Time objects with the same seconds and fractional
seconds.
Show source
static VALUE
time_eql(VALUE time1, VALUE time2)
{
struct time_object *tobj1, *tobj2;
GetTimeval(time1, tobj1);
if (TYPE(time2) == T_DATA && RDATA(time2)->dfree == time_free) {
GetTimeval(time2, tobj2);
if (tobj1->ts.tv_sec == tobj2->ts.tv_sec) {
if (tobj1->ts.tv_nsec == tobj2->ts.tv_nsec) return Qtrue;
}
}
return Qfalse;
}