publish final code
Fork of Pubnub_c_core by
pubnub_timers.cpp@3:9cb790d5df10, 2017-02-21 (annotated)
- Committer:
- cswiger
- Date:
- Tue Feb 21 22:23:28 2017 +0000
- Revision:
- 3:9cb790d5df10
- Parent:
- 0:d13755cfb705
Publish final project code
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 |