Project

General

Profile

Actions

Feature #3309

open

osmo_timer_* should use monotonic clock

Added by neels almost 6 years ago. Updated almost 6 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
05/30/2018
Due date:
% Done:

0%

Spec Reference:

Description

Currently, osmo_timer_* and thus also osmo_fsm_* use osmo_gettimeofday(), meaning that when the user changes the system time, all of our timers glitch. This affects all osmo_timer_* and all osmo_fsm_inst_state_chg(T). I think we should change all of those to monotonic clock.

Would relying on time-of-day be a distinct feature users might rely on? If yes we'd need to add new API to indicate that we want a monotonic clock. I think that is not necessary: the API is only concerned with time durations, and glitching those because of system time change was never intended. We should just change to monotonic clock under the hood without API changes.

Comments welcome.


Related issues

Related to libosmocore - Bug #2586: fix timer duration calculationsResolvedstsp10/20/2017

Actions
Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)