summaryrefslogtreecommitdiff
path: root/time.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-04-08 10:14:35 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-04-08 10:14:35 +0000
commit529bc6166cb3e6083678c278d8a871e803420804 (patch)
tree386375e77892e9e6d16f579c2bdcbdf55152da23 /time.c
parentc5c55b1f9fc68a99aeea1336f0a648881846647c (diff)
1.2.4
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'time.c')
-rw-r--r--time.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/time.c b/time.c
index bceb0854dc..25c953e12e 100644
--- a/time.c
+++ b/time.c
@@ -397,6 +397,21 @@ time_hash(time)
}
static VALUE
+time_clone(time)
+ VALUE time;
+{
+ VALUE obj;
+ struct time_object *tobj, *newtobj;
+
+ GetTimeval(time, tobj);
+ obj = Data_Make_Struct(0, struct time_object, 0, free, newtobj);
+ CLONESETUP(obj, time);
+ MEMCPY(newtobj, tobj, struct time_object, 1);
+
+ return obj;
+}
+
+static VALUE
time_localtime(time)
VALUE time;
{