Modify the *time*() functions to avoid passing structures in arguments (using const pointers instead) or returning structures (using result arguments instead).
After all, this is not really UDP-specific.