Skip to content

Commit

Permalink
Fixed EM.current_time to be faster than Time.now
Browse files Browse the repository at this point in the history
  • Loading branch information
jakedouglas committed Jun 22, 2009
1 parent e627ab1 commit 6911d3b
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions ext/rubymain.cpp
Expand Up @@ -867,13 +867,8 @@ t_get_loop_time

static VALUE t_get_loop_time (VALUE self)
{
VALUE cTime = rb_path2class("Time");
if (gCurrentLoopTime != 0) {
return rb_funcall(cTime,
rb_intern("at"),
2,
INT2NUM(gCurrentLoopTime / 1000000),
INT2NUM(gCurrentLoopTime % 1000000));
return rb_time_new(gCurrentLoopTime / 1000000, gCurrentLoopTime % 1000000);
}
return Qnil;
}
Expand Down

0 comments on commit 6911d3b

Please sign in to comment.