Added latence testing code