timestamp 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 78c7793d3e2680e44126c4207f5cd63bb0512fd4
4
+ data.tar.gz: 96b79c986ecf33a16d2afbe65328c3fc1bf80b38
5
+ SHA512:
6
+ metadata.gz: f25c1018ae1c1685e0d77ed7ee2fe04485ee600be9be5921ac771d9fdad08c4e042c28b0082d5a7a4badb4234264fea93b1b2b18b8dccbcd3d2e903d7ce09e88
7
+ data.tar.gz: 709781e765b47843f91096ffb43fa442c7e0d8cd126dab87a9e9c0a0c55139af4cdcc9309240ee76dcc8b66cf09c18df867b7f54c14893ade047b53983c043db
@@ -0,0 +1,21 @@
1
+ #include "ruby.h"
2
+
3
+ /*
4
+ * call-seq:
5
+ * Time.current_timestamp -> int
6
+ *
7
+ * Returns the current time as an integer number of seconds
8
+ * since the Epoch.
9
+ *
10
+ * Time.current_timestamp #=> 1363352771
11
+ */
12
+
13
+ static VALUE
14
+ time_s_current_timestamp(VALUE klass)
15
+ {
16
+ return INT2NUM( time(NULL) );
17
+ }
18
+
19
+ void Init_timestamp() {
20
+ rb_define_singleton_method(rb_cTime, "current_timestamp", time_s_current_timestamp, 0);
21
+ }
@@ -0,0 +1,5 @@
1
+ require 'mkmf'
2
+ extension_name = 'timestamp'
3
+ dir_config(extension_name)
4
+ create_makefile(extension_name)
5
+
metadata ADDED
@@ -0,0 +1,47 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: timestamp
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Matthew Kerwin
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-03-15 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Defines Time.current_timestamp , from https://bugs.ruby-lang.org/issues/8096
14
+ email:
15
+ - matthew@kerwin.net.au
16
+ executables: []
17
+ extensions:
18
+ - ext/timestamp/extconf.rb
19
+ extra_rdoc_files: []
20
+ files:
21
+ - ext/timestamp/Timestamp.c
22
+ - ext/timestamp/extconf.rb
23
+ homepage: http://rubygems.org/gems/timestamp
24
+ licenses:
25
+ - Simplified BSD License
26
+ metadata: {}
27
+ post_install_message:
28
+ rdoc_options: []
29
+ require_paths:
30
+ - lib
31
+ required_ruby_version: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - '>='
34
+ - !ruby/object:Gem::Version
35
+ version: '0'
36
+ required_rubygems_version: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ requirements: []
42
+ rubyforge_project:
43
+ rubygems_version: 2.0.2
44
+ signing_key:
45
+ specification_version: 4
46
+ summary: Time.current_timestamp
47
+ test_files: []