line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
MODULE = ZMQ::Raw PACKAGE = ZMQ::Raw::Timer |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
SV * |
4
|
|
|
|
|
|
|
_new (class, context, after, interval) |
5
|
|
|
|
|
|
|
SV *class |
6
|
|
|
|
|
|
|
SV *context |
7
|
|
|
|
|
|
|
int after |
8
|
|
|
|
|
|
|
SV *interval |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
PREINIT: |
11
|
|
|
|
|
|
|
zmq_raw_timer *timer; |
12
|
|
|
|
|
|
|
zmq_raw_context *ctx; |
13
|
|
|
|
|
|
|
zmq_raw_socket *sock; |
14
|
|
|
|
|
|
|
SV *sv; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
CODE: |
17
|
24
|
|
|
|
|
|
ctx = ZMQ_SV_TO_PTR (Context, context); |
18
|
|
|
|
|
|
|
|
19
|
24
|
|
|
|
|
|
zmq_raw_mutex_lock (ctx->mutex); |
20
|
24
|
100
|
|
|
|
|
if (ctx->timers == NULL) |
21
|
|
|
|
|
|
|
{ |
22
|
3
|
|
|
|
|
|
ctx->timers = zmq_raw_timers_create(); |
23
|
3
|
50
|
|
|
|
|
if (ctx->timers == NULL) |
24
|
|
|
|
|
|
|
{ |
25
|
0
|
|
|
|
|
|
zmq_raw_mutex_unlock (ctx->mutex); |
26
|
0
|
0
|
|
|
|
|
zmq_raw_check_error (-1); |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
} |
29
|
24
|
|
|
|
|
|
zmq_raw_mutex_unlock (ctx->mutex); |
30
|
|
|
|
|
|
|
|
31
|
24
|
100
|
|
|
|
|
timer = zmq_raw_timers_start (ctx->timers, ctx->context, |
|
|
50
|
|
|
|
|
|
32
|
0
|
|
|
|
|
|
after, SvIOK (interval) ? SvIV (interval) : 0); |
33
|
24
|
50
|
|
|
|
|
if (timer == NULL) |
34
|
0
|
0
|
|
|
|
|
zmq_raw_check_error (-1); |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
35
|
|
|
|
|
|
|
|
36
|
24
|
|
|
|
|
|
Newxz (sock, 1, zmq_raw_socket); |
37
|
24
|
|
|
|
|
|
sock->socket = zmq_raw_timer_get_recv (timer); |
38
|
|
|
|
|
|
|
|
39
|
24
|
|
|
|
|
|
ZMQ_NEW_OBJ_WITH_MAGIC (sv, "ZMQ::Raw::Socket", sock, |
40
|
|
|
|
|
|
|
SvRV (context)); |
41
|
24
|
|
|
|
|
|
zmq_raw_timer_set_sv (timer, sv); |
42
|
|
|
|
|
|
|
|
43
|
24
|
50
|
|
|
|
|
ZMQ_NEW_OBJ_WITH_MAGIC (RETVAL, SvPVbyte_nolen (class), timer, |
44
|
|
|
|
|
|
|
SvRV (context)); |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
OUTPUT: RETVAL |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
void |
49
|
|
|
|
|
|
|
id (self) |
50
|
|
|
|
|
|
|
SV *self |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
PREINIT: |
53
|
|
|
|
|
|
|
zmq_raw_timer *timer; |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
CODE: |
56
|
1
|
|
|
|
|
|
timer = ZMQ_SV_TO_PTR (Timer, self); |
57
|
1
|
|
|
|
|
|
XSRETURN_IV (zmq_raw_timer_id (timer)); |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
SV * |
60
|
|
|
|
|
|
|
running (self) |
61
|
|
|
|
|
|
|
SV *self |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
PREINIT: |
64
|
|
|
|
|
|
|
zmq_raw_timer *timer; |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
PPCODE: |
67
|
124
|
|
|
|
|
|
timer = ZMQ_SV_TO_PTR (Timer, self); |
68
|
124
|
100
|
|
|
|
|
if (zmq_raw_timer_is_running (timer)) |
69
|
111
|
|
|
|
|
|
XSRETURN_YES; |
70
|
|
|
|
|
|
|
|
71
|
13
|
|
|
|
|
|
XSRETURN_NO; |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
int |
74
|
|
|
|
|
|
|
interval (self, ...) |
75
|
|
|
|
|
|
|
SV *self |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
PREINIT: |
78
|
|
|
|
|
|
|
int interval; |
79
|
|
|
|
|
|
|
zmq_raw_timer *timer; |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
CODE: |
82
|
8
|
|
|
|
|
|
timer = ZMQ_SV_TO_PTR (Timer, self); |
83
|
|
|
|
|
|
|
|
84
|
8
|
100
|
|
|
|
|
if (items > 1) |
85
|
|
|
|
|
|
|
{ |
86
|
6
|
50
|
|
|
|
|
if (!SvIOK (ST (1)) || SvIV (ST (1)) <= 0) |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
87
|
0
|
|
|
|
|
|
croak_usage ("interval should be greater than zero"); |
88
|
|
|
|
|
|
|
|
89
|
6
|
50
|
|
|
|
|
interval = SvIV (ST (1)); |
90
|
6
|
|
|
|
|
|
zmq_raw_timer_set_interval (timer, interval); |
91
|
|
|
|
|
|
|
} |
92
|
|
|
|
|
|
|
|
93
|
8
|
|
|
|
|
|
RETVAL = zmq_raw_timer_get_interval (timer); |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
OUTPUT: RETVAL |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
void |
98
|
|
|
|
|
|
|
_cancel (self) |
99
|
|
|
|
|
|
|
SV *self |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
PREINIT: |
102
|
|
|
|
|
|
|
zmq_raw_timer *timer; |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
CODE: |
105
|
14
|
|
|
|
|
|
timer = ZMQ_SV_TO_PTR (Timer, self); |
106
|
|
|
|
|
|
|
|
107
|
14
|
|
|
|
|
|
zmq_raw_timers_stop (timer); |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
void |
110
|
|
|
|
|
|
|
expire (self) |
111
|
|
|
|
|
|
|
SV *self |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
PREINIT: |
114
|
|
|
|
|
|
|
zmq_raw_timer *timer; |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
CODE: |
117
|
1
|
|
|
|
|
|
timer = ZMQ_SV_TO_PTR (Timer, self); |
118
|
|
|
|
|
|
|
|
119
|
1
|
|
|
|
|
|
zmq_raw_timers_expire (timer); |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
void |
122
|
|
|
|
|
|
|
_reset (self) |
123
|
|
|
|
|
|
|
SV *self |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
PREINIT: |
126
|
|
|
|
|
|
|
zmq_raw_timer *timer; |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
CODE: |
129
|
27
|
|
|
|
|
|
timer = ZMQ_SV_TO_PTR (Timer, self); |
130
|
|
|
|
|
|
|
|
131
|
27
|
|
|
|
|
|
zmq_raw_timers_reset (timer); |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
SV * |
134
|
|
|
|
|
|
|
socket (self) |
135
|
|
|
|
|
|
|
SV *self |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
PREINIT: |
138
|
|
|
|
|
|
|
zmq_raw_timer *timer; |
139
|
|
|
|
|
|
|
SV *recv; |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
CODE: |
142
|
306
|
|
|
|
|
|
timer = ZMQ_SV_TO_PTR (Timer, self); |
143
|
306
|
|
|
|
|
|
recv = MUTABLE_SV (zmq_raw_timer_get_sv (timer)); |
144
|
|
|
|
|
|
|
|
145
|
306
|
|
|
|
|
|
SvREFCNT_inc (recv); |
146
|
306
|
|
|
|
|
|
RETVAL = recv; |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
OUTPUT: RETVAL |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
void |
151
|
|
|
|
|
|
|
DESTROY (self) |
152
|
|
|
|
|
|
|
SV *self |
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
PREINIT: |
155
|
|
|
|
|
|
|
zmq_raw_timer *timer; |
156
|
|
|
|
|
|
|
SV *recv; |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
CODE: |
159
|
24
|
|
|
|
|
|
timer = ZMQ_SV_TO_PTR (Timer, self); |
160
|
24
|
|
|
|
|
|
recv = MUTABLE_SV (zmq_raw_timer_get_sv (timer)); |
161
|
|
|
|
|
|
|
|
162
|
24
|
|
|
|
|
|
zmq_raw_timers_remove (timer); |
163
|
|
|
|
|
|
|
|
164
|
24
|
|
|
|
|
|
SvREFCNT_dec (recv); |
165
|
24
|
|
|
|
|
|
SvREFCNT_dec (ZMQ_SV_TO_MAGIC (self)); |
166
|
|
|
|
|
|
|
|