The timeout calculations are done based on time read from the curvecpr_util_nanoseconds() call which by default uses the CLOCK_REALTIME source. This means that if a timeout is set and the time is then moved forward the timeout will not occur as expected but will be further delayed by the wall time jump.
I would strongly recommend to use CLOCK_MONOTONIC instead to avoid this pitfall.