This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: PATCH: Add gettimeofday to libiberty
- From: Danny Smith <dannysmith at clear dot net dot nz>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: mark at codesourcery dot com, ian at airs dot com, dj at redhat dot com
- Date: Thu, 10 Mar 2005 21:40:56 +1300
- Subject: RE: PATCH: Add gettimeofday to libiberty
- Reply-to: Danny Smith <dannysmith at users dot sourceforge dot net>
Mark Mitchell wrote:
> DJ, Ian --
>
> As per our off-list discussions, here is a path to add gettimeofday to
> libiberty, for the benefit of Windows.
>
> OK to install?
>
> --
> Mark Mitchell
The patch provides only 1 sec resolution in struct timeval. Is that all
that is required?
Would a patch that uses win32api time function (GetSystemTimeAsFileTime)
to get microsecond resolution be acceptable, guarded with #ifdef
__MINGW32__ ? The win32api function is also faster than the CRT
function time(). (The CRT function supports legacy pre-3.5 NT versions
and pre-Windows95 win32S, where GetSystemTimeAsFileTime is not available)
If such a patch is not acceptable, a statement to that effect is just as good
from
my perspective, since that would provide another argument to add gettimeofday
to mingw's extension runtime.
Danny