engines/cpu: fix potential overflow in thinktime calculation