time analysis of iterative programs