[lib] return 0 if we end up with a broken duration - system clock may be running slow