AT&T IoT hackster.io contest Carpal2
Fork of Pubnub_c_core by
Diff: pubnub_timers.cpp
- Revision:
- 0:d13755cfb705
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pubnub_timers.cpp Thu Nov 10 22:20:11 2016 +0000 @@ -0,0 +1,22 @@ +/* -*- c-file-style:"stroustrup"; indent-tabs-mode: nil -*- */ +#include "pubnub_timers.h" + +#include "pubnub_assert.h" +#include "pubnub_internal.h" + + +int pubnub_set_transaction_timeout(pubnub_t *p, int duration_ms) +{ + PUBNUB_ASSERT_OPT(p != NULL); + PUBNUB_ASSERT_OPT(duration_ms > 0); + p->transaction_timeout_ms = duration_ms; + return 0; +} + + +int pubnub_transaction_timeout_get(pubnub_t *p) +{ + PUBNUB_ASSERT_OPT(p != NULL); + return p->transaction_timeout_ms; +} +