Method: Time#initialize_copy

Defined in:
time.c

#initialize_copy(time) ⇒ Object

:nodoc:



4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
# File 'time.c', line 4056

static VALUE
time_init_copy(VALUE copy, VALUE time)
{
    struct time_object *tobj, *tcopy;

    if (!OBJ_INIT_COPY(copy, time)) return copy;
    GetTimeval(time, tobj);
    GetNewTimeval(copy, tcopy);
    MEMCPY(tcopy, tobj, struct time_object, 1);

    return copy;
}