In real life - aka if you set now = vlib_time_now(vm) - the variable "now" would be the number of f64 seconds since vpp started, not the number of f64 seconds since 1/1/1970. Although you don't show the entire code, it looks like you built it into vpp instead of as a standalone test.
In terms of working out what's happening, try random_f64(...) with a fixed seed so that the test sequence is 100% reproducible. Please make sure that you're not accidentally failing to call tw_expire_timers_xxx for an entire second or something like that. Calling tw_timer_expire_timers_xxx less frequently than the stated tick rate guarantees poor behavior. The code shouldn't misbehave in a gross way - if it does, we'll fix it - but there's no reason to expect things to work properly if you violate the laws of physics... HTH... Dave
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#13354): https://lists.fd.io/g/vpp-dev/message/13354 Mute This Topic: https://lists.fd.io/mt/32192172/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-