Cliff Woolley wrote:

On Mon, 15 Jul 2002, Brian Pane wrote:



(seconds << 20) + microseconds



Yeah, but addition and subtraction of the resulting scalars would require just as many carry/underflow checks as a structure would...


You can rely on normal scalar arithmetic to handle the carry. The only catch is that the microseconds can become as large as 2^20 - 1. But you only have to check for that case when extracting seconds or microseconds. That's bad, although not as bad as a 64-bit division.

--Brian




Reply via email to