Re: [Patch, fortran] PR 56919 SYSTEM_CLOCK on Windows

2013-04-15 Thread Janne Blomqvist
On Mon, Apr 15, 2013 at 3:51 PM, Tobias Burnus wrote: > Janne Blomqvist wrote: >> >> I committed the attached patch with most of your suggestions as r197968. > > > Thanks! Although, I assume you meant "kind=8" in the last sentence: > >> +the underlying platform clock. @var{COUNT_MAX} usually equal

Re: [Patch, fortran] PR 56919 SYSTEM_CLOCK on Windows

2013-04-15 Thread Tobias Burnus
Janne Blomqvist wrote: I committed the attached patch with most of your suggestions as r197968. Thanks! Although, I assume you meant "kind=8" in the last sentence: +the underlying platform clock. @var{COUNT_MAX} usually equals +@code{HUGE(COUNT_MAX)}. Note that the millisecond resolution of t

Re: [Patch, fortran] PR 56919 SYSTEM_CLOCK on Windows

2013-04-15 Thread Janne Blomqvist
On Mon, Apr 15, 2013 at 11:37 AM, Tobias Burnus wrote: > Janne Blomqvist wrote: >> >> Attached is an updated patch which uses GetTickCount for system_clock_4; >> this should be fine as system_clock_4 wraps around in ~25 days anyways. For >> system_clock_8 it uses QueryPerformance{Counter,Frequency

Re: [Patch, fortran] PR 56919 SYSTEM_CLOCK on Windows

2013-04-15 Thread Tobias Burnus
Janne Blomqvist wrote: Attached is an updated patch which uses GetTickCount for system_clock_4; this should be fine as system_clock_4 wraps around in ~25 days anyways. For system_clock_8 it uses QueryPerformance{Counter,Frequency}. The patch also adds an additional check for _POSIX_MONOTONI

Re: [Patch, fortran] PR 56919 SYSTEM_CLOCK on Windows

2013-04-13 Thread Janne Blomqvist
On Sat, Apr 13, 2013 at 1:02 AM, Tobias Burnus wrote: > Janne Blomqvist wrote: >> >> the attached patch implements the SYSTEM_CLOCK intrinsics on the MinGW >> and Cygwin targets using the GetTickCount/GetTickCount64 functions. >> These should be quite robust monotonic clocks and AFAICS are the bes

Re: [Patch, fortran] PR 56919 SYSTEM_CLOCK on Windows

2013-04-13 Thread Janne Blomqvist
On Fri, Apr 12, 2013 at 11:49 PM, Dave Korn wrote: > On 12/04/2013 19:47, Janne Blomqvist wrote: > >> As I don't have a Windows system to test on, I would appreciate if somebody >> more familiar with that platform could take a quick look. In particular, I >> *think* it should be Ok to use win32 AP

Re: [Patch, fortran] PR 56919 SYSTEM_CLOCK on Windows

2013-04-12 Thread Tobias Burnus
Janne Blomqvist wrote: the attached patch implements the SYSTEM_CLOCK intrinsics on the MinGW and Cygwin targets using the GetTickCount/GetTickCount64 functions. These should be quite robust monotonic clocks and AFAICS are the best we can do on Windows. I think using QueryPerformanceCounter is

Re: [Patch, fortran] PR 56919 SYSTEM_CLOCK on Windows

2013-04-12 Thread Dave Korn
On 12/04/2013 19:47, Janne Blomqvist wrote: > As I don't have a Windows system to test on, I would appreciate if somebody > more familiar with that platform could take a quick look. In particular, I > *think* it should be Ok to use win32 API functions on Cygwin (that is, > cygwin-gcc ships the win

[Patch, fortran] PR 56919 SYSTEM_CLOCK on Windows

2013-04-12 Thread Janne Blomqvist
Hi, the attached patch implements the SYSTEM_CLOCK intrinsics on the MinGW and Cygwin targets using the GetTickCount/GetTickCount64 functions. These should be quite robust monotonic clocks and AFAICS are the best we can do on Windows. See e.g. http://www.python.org/dev/peps/pep-0418/ for details.