[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gettimeofday() refresh period 15.6 ms
From: |
arnold |
Subject: |
Re: gettimeofday() refresh period 15.6 ms |
Date: |
Sun, 30 Mar 2025 02:48:26 -0600 |
User-agent: |
Heirloom mailx 12.5 7/5/10 |
Undoubtedly a Windows issue.
Eli, the code is in extension/time.c; maybe there's something to
do, maybe there isn't.
Thanks,
Arnold
Denis Shirokov <cosmogen@gmail.com> wrote:
> Hi Gawk Team!
>
> i found that gettimeofday() function refreshs returned result every 15.6 ms.
> i see that issue in the first time - after upgrading system from Windows 10
> Pro x64 to Windows 11 Pro x64
>
> the script is following (also attached):
>
> @load "time"
>
> BEGIN{
> while ( 1 ) {
> t = awk::gettimeofday()
> while ( 0 == pt = awk::gettimeofday() - t ) { }
> print "freeze: " pt " sec" }
> }
>
> outputs:
>
> ...
> freeze: 0.0156271 sec
> freeze: 0.0156248 sec
> freeze: 0.0156245 sec
> freeze: 0.0156217 sec
> ...
>
> GNU Awk 5.3.1, API 4.0, (GNU MPFR 4.0.2, GNU MP 6.1.2)
> Windows 11 Pro (x64)
> runs from cmd
>
> This issue is likely related to Windows 11 itself rather than any errors in
> the code. In any case, such a large timer update interval mostly "kills"
> the purpose of this function.
>
> Regards
> Denis