Passing struct by reference to time measuring function