This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: PATCH: Add gettimeofday to libiberty


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]