Skip to content

Commit

Permalink
Add missing Time methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Watson1978 committed Dec 29, 2017
1 parent d6f83f4 commit 2a16c63
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 2 deletions.
16 changes: 16 additions & 0 deletions bench/Time/gm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
-
description: Time.gm(year, month, day, hour, min, sec, usec_with_frac)
benchmark: |-
Time.gm(2000, 1, 1, 23, 59, 59, 5000)
-
description: Time.gm(sec, min, hour, mday, mon, year, wday, yday, isdst, zone)
benchmark: |-
Time.gm(59, 59, 23, 1, 1, 2000, 6, 1, false, "JST")
-
description: Time.utc(year, month, day, hour, min, sec, usec_with_frac)
benchmark: |-
Time.utc(2000, 1, 1, 23, 59, 59, 5000)
-
description: Time.utc(sec, min, hour, mday, mon, year, wday, yday, isdst, zone)
benchmark: |-
Time.utc(59, 59, 23, 1, 1, 2000, 6, 1, false, "JST")
16 changes: 16 additions & 0 deletions bench/Time/mktime.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
-
description: Time.mktime(year, month, day, hour, min, sec, usec_with_frac)
benchmark: |-
Time.mktime(2000, 1, 1, 23, 59, 59, 5000)
-
description: Time.mktime(sec, min, hour, mday, mon, year, wday, yday, isdst, zone)
benchmark: |-
Time.mktime(59, 59, 23, 1, 1, 2000, 6, 1, false, "JST")
-
description: Time.local(year, month, day, hour, min, sec, usec_with_frac)
benchmark: |-
Time.local(2000, 1, 1, 23, 59, 59, 5000)
-
description: Time.local(sec, min, hour, mday, mon, year, wday, yday, isdst, zone)
benchmark: |-
Time.local(59, 59, 23, 1, 1, 2000, 6, 1, false, "JST")
4 changes: 4 additions & 0 deletions bench/Time/now.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-
description: Time.now
benchmark: |-
Time.now
6 changes: 6 additions & 0 deletions bench/Time/nsec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,9 @@
t = Time.now
benchmark: |-
t.nsec
-
description: Time#tv_nsec
before: |-
t = Time.now
benchmark: |-
t.tv_nsec
4 changes: 2 additions & 2 deletions bench/Time/usec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
benchmark: |-
t.usec
-
description: Time#tv_nsec
description: Time#tv_usec
before: |-
t = Time.now
benchmark: |-
t.tv_nsec
t.tv_usec

0 comments on commit 2a16c63

Please sign in to comment.