tv_usec()
public
Returns just the number of microseconds for time.
t = Time.now
"%10.6f" % t.to_f
t.usec
Show source
static VALUE
time_usec(VALUE time)
{
struct time_object *tobj;
wideval_t w, q, r;
GetTimeval(time, tobj);
w = wmod(tobj->timew, WINT2WV(TIME_SCALE));
wmuldivmod(w, WINT2FIXWV(1000000), WINT2FIXWV(TIME_SCALE), &q, &r);
return rb_to_int(w2v(q));
}