tv_sec()
public
Returns the value of time as an integer number of seconds since
epoch.
t = Time.now
"%10.5f" % t.to_f
t.to_i
Show source
/*
* call-seq:
* time.to_i => int
* time.tv_sec => int
*
* Returns the value of <i>time</i> as an integer number of seconds
* since epoch.
*
* t = Time.now
* "%10.5f" % t.to_f
* t.to_i
*/
static VALUE
time_to_i(time)
VALUE time;
{
struct time_object *tobj;
GetTimeval(time, tobj);
return LONG2NUM(tobj->tv.tv_sec);
}