aboutsummaryrefslogtreecommitdiffstats
path: root/src/fsm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fsm.c')
-rw-r--r--src/fsm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fsm.c b/src/fsm.c
index ac53bca7..042d9536 100644
--- a/src/fsm.c
+++ b/src/fsm.c
@@ -436,7 +436,7 @@ static int state_chg(struct osmo_fsm_inst *fi, uint32_t new_state,
struct osmo_fsm *fsm = fi->fsm;
uint32_t old_state = fi->state;
const struct osmo_fsm_state *st = &fsm->states[fi->state];
- struct timeval remaining;
+ struct timespec remaining;
/* validate if new_state is a valid state */
if (!(st->out_state_mask & (1 << new_state))) {
@@ -454,10 +454,10 @@ static int state_chg(struct osmo_fsm_inst *fi, uint32_t new_state,
if (st->onleave)
st->onleave(fi, new_state);
- if (keep_timer && fi->timer.active && (osmo_timer_remaining(&fi->timer, NULL, &remaining) == 0))
+ if (keep_timer && fi->timer.active && (osmo_timer_remaining2(&fi->timer, &remaining) == 0))
LOGPFSMSRC(fi, file, line, "State change to %s (keeping T%d, %ld.%03lds remaining)\n",
osmo_fsm_state_name(fsm, new_state),
- fi->T, remaining.tv_sec, remaining.tv_usec / 1000);
+ fi->T, remaining.tv_sec, remaining.tv_nsec / 1000000);
else if (timeout_secs && !keep_timer)
LOGPFSMSRC(fi, file, line, "State change to %s (T%d, %lus)\n",
osmo_fsm_state_name(fsm, new_state),