Fixed pertime calculating