AT&T IoT hackster.io contest Carpal2
Fork of Pubnub_c_core by
pubnub_timers.cpp@3:5cd7590d8b9e, 2016-12-20 (annotated)
- Committer:
- cswiger
- Date:
- Tue Dec 20 16:38:16 2016 +0000
- Revision:
- 3:5cd7590d8b9e
- Parent:
- 0:d13755cfb705
Initial publish AT&T IoT Hackster.io contest CarPal2
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
sveljko | 0:d13755cfb705 | 1 | /* -*- c-file-style:"stroustrup"; indent-tabs-mode: nil -*- */ |
sveljko | 0:d13755cfb705 | 2 | #include "pubnub_timers.h" |
sveljko | 0:d13755cfb705 | 3 | |
sveljko | 0:d13755cfb705 | 4 | #include "pubnub_assert.h" |
sveljko | 0:d13755cfb705 | 5 | #include "pubnub_internal.h" |
sveljko | 0:d13755cfb705 | 6 | |
sveljko | 0:d13755cfb705 | 7 | |
sveljko | 0:d13755cfb705 | 8 | int pubnub_set_transaction_timeout(pubnub_t *p, int duration_ms) |
sveljko | 0:d13755cfb705 | 9 | { |
sveljko | 0:d13755cfb705 | 10 | PUBNUB_ASSERT_OPT(p != NULL); |
sveljko | 0:d13755cfb705 | 11 | PUBNUB_ASSERT_OPT(duration_ms > 0); |
sveljko | 0:d13755cfb705 | 12 | p->transaction_timeout_ms = duration_ms; |
sveljko | 0:d13755cfb705 | 13 | return 0; |
sveljko | 0:d13755cfb705 | 14 | } |
sveljko | 0:d13755cfb705 | 15 | |
sveljko | 0:d13755cfb705 | 16 | |
sveljko | 0:d13755cfb705 | 17 | int pubnub_transaction_timeout_get(pubnub_t *p) |
sveljko | 0:d13755cfb705 | 18 | { |
sveljko | 0:d13755cfb705 | 19 | PUBNUB_ASSERT_OPT(p != NULL); |
sveljko | 0:d13755cfb705 | 20 | return p->transaction_timeout_ms; |
sveljko | 0:d13755cfb705 | 21 | } |
sveljko | 0:d13755cfb705 | 22 |