develooper Front page | perl.perl5.porters | Postings from July 2013

[perl #118777] times() function overflows after 49.7 days (2**32 millisec)

Thread Previous | Thread Next
From:
Father Chrysostomos via RT
Date:
July 6, 2013 03:40
Subject:
[perl #118777] times() function overflows after 49.7 days (2**32 millisec)
Message ID:
rt-3.6.HEAD-2552-1373081996-641.118777-15-0@perl.org
On Fri Jul 05 19:21:55 2013, kjohnstn wrote:
> Something is overflowing a 32 bit value: (2**32)millisec is
> 4294967.296s, about 50 days.
> 
> I don't know for sure whether the overflow is in perl or in the OS,
> but
> I don't know how to tell the difference.

The value returned by the OS is of type clock_t.  pp_tms in pp_sys.c
casts it to NV.

I don’t know enough about C to know whether that has anything to do with it.

-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: new
https://rt.perl.org:443/rt3/Ticket/Display.html?id=118777

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About