Method for computing elapsed time between events