timestamp 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/timestamp/Timestamp.c +4 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 87727f69d7ba11cdc52c27a1c150730806402a0d
|
4
|
+
data.tar.gz: 4ac070bc75d8891c1a3871282d9f241de96f6057
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 01a39507bbee1925a209ab243f2227125ff5b919b9ba944742b0ed1b3e6a77267638e39a294dbf0e7bb719a3bd092c43dba242034bdd854ec7856744290003d2
|
7
|
+
data.tar.gz: 78945ed73f03e5aa91202560e07ef065775f2ebc47a12e2227dab25bcaa296a8b897ac750526d6230776b9617137f301d17a2d0889a242e599300e071df7509d
|
data/ext/timestamp/Timestamp.c
CHANGED
@@ -1,13 +1,16 @@
|
|
1
1
|
#include "ruby.h"
|
2
|
+
#include <time.h>
|
2
3
|
|
3
4
|
/*
|
4
5
|
* call-seq:
|
5
6
|
* Time.current_timestamp -> int
|
7
|
+
* Time.timestamp -> int
|
6
8
|
*
|
7
9
|
* Returns the current time as an integer number of seconds
|
8
10
|
* since the Epoch.
|
9
11
|
*
|
10
12
|
* Time.current_timestamp #=> 1363352771
|
13
|
+
* Time.timestamp #=> 1363352771
|
11
14
|
*/
|
12
15
|
|
13
16
|
static VALUE
|
@@ -18,4 +21,5 @@ time_s_current_timestamp(VALUE klass)
|
|
18
21
|
|
19
22
|
void Init_timestamp() {
|
20
23
|
rb_define_singleton_method(rb_cTime, "current_timestamp", time_s_current_timestamp, 0);
|
24
|
+
rb_define_singleton_method(rb_cTime, "timestamp", time_s_current_timestamp, 0);
|
21
25
|
}
|