Patch for epoch in hires_ms::usecs() value

Conrad Scott Conrad.Scott@dsl.pipex.com
Fri Jun 7 14:05:00 GMT 2002


Currently the hires_ms::usecs() method returns microseconds from the winnt
epoch (i.e. 1 January, 1601). It is then used in gettimeofday() without
adjustment, but that is meant to give seconds and microseconds since the
"Unix" epoch (i.e. 1 January, 1970).

The attached patch changes hires_ms::usecs() to return microseconds since
the "Unix" epoch. I've changed it there since that's the easiest place to
patch it :-)
// Conrad

2002-06-07  Conrad Scott  <conrad.scott@dsl.pipex.com>

 * times.cc (hires_ms::prime): Adjust epoch of initime_us from 1601
 to 1970.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: times.patch
Type: application/octet-stream
Size: 491 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20020607/99f96f48/attachment.obj>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ChangeLog.txt
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20020607/99f96f48/attachment.txt>


More information about the Cygwin-patches mailing list