chrono: address post commit comments from Howard
Drawing some inspiration from code from Bill O'Neal as pointed out by Howard, rework the code to avoid an overflow in the duration. Adjust the style to match libc++ style as well. Create a local typedef for the FILETIME duration (100-ns units). Use this to define the difference between the NT and the UNIX epochs (which previously overflowed due to the representation limits due to the bouncing to ns). Return the FILETIME duration biased by the NT-to-UNIX epoch conversion. Use of the custom duration makes it easier to read and reason about the code. llvm-svn: 290806
Loading
Please sign in to comment