Skip to content
Commit e91473c3 authored by Saleem Abdulrasool's avatar Saleem Abdulrasool
Browse files

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
parent cfc01154
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment