diff options
author | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2023-12-30 03:18:18 +0700 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2024-01-09 13:11:04 +0000 |
commit | 83c8c8002f377a8feb0aad3941fc373b0dbbd769 (patch) | |
tree | 1efaff8e5d22ecb19be45332cb2eb2d4e6ed30d9 /tests/tdef/tdef_test.ok | |
parent | 90df3f40f1d06ec2dc86334052d7969308286c4d (diff) |
core: osmo_tdef_fsm_inst_state_chg(): allow millisecond precision
This API predates commit 7b74551b9, which added support for millisecond
granularity to osmo_fsm. Let's do the same for the tdef FSM wrapper
API, allowing the millisecond precision without rounding-up to seconds.
Of course, this patch changes behavior of the existing API, but having
more precise state timeouts is not going to make the API user
experience worse.
The old behavior of using seconds is for kept for:
* OSMO_TDEF_CUSTOM -- still treated as if it was OSMO_TDEF_S.
* \param[in] default_timeout -- still expected to be in seconds.
Change-Id: I4c4ee89e7e32e86f74cd215f5cbfa44ace5426c1
Related: 7b74551b9 "fsm: Allow millisecond granularity in osmo_fsm built-in timer"
Diffstat (limited to 'tests/tdef/tdef_test.ok')
-rw-r--r-- | tests/tdef/tdef_test.ok | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/tdef/tdef_test.ok b/tests/tdef/tdef_test.ok index d934292f..827b9ab3 100644 --- a/tests/tdef/tdef_test.ok +++ b/tests/tdef/tdef_test.ok @@ -165,11 +165,11 @@ osmo_tdef_get(7, s) = 50 test_tdef_state_timeout() state=A T=0, no timeout --> A (configured as T1 100 s) rc=0; state=A T=1, 100.000000 s remaining - --> B (configured as T2 100 ms) rc=0; state=B T=2, 1.000000 s remaining + --> B (configured as T2 100 ms) rc=0; state=B T=2, 0.100000 s remaining --> C (configured as T3 50 m) rc=0; state=C T=3, 3000.000000 s remaining --> D (configured as T4 100 custom-unit) rc=0; state=D T=4, 100.000000 s remaining - --> E (configured as T-5 100 ms) rc=0; state=E T=-5, 1.000000 s remaining - --> F (configured as T-6 100 us) rc=0; state=F T=-6, 1.000000 s remaining + --> E (configured as T-5 100 ms) rc=0; state=E T=-5, 0.100000 s remaining + --> F (configured as T-6 100 us) rc=0; state=F T=-6, 0.001000 s remaining --> G (configured as T7 50 s) rc=0; state=G T=7, 50.000000 s remaining --> H (configured as T8 300 s) rc=0; state=H T=8, 300.000000 s remaining --> I (configured as T9 5 m) rc=0; state=I T=9, 300.000000 s remaining |