Added throws declaration to compareTimestamp