Fixed simulation duration calculation