Re: int|float for sleep? sleep(0.1) => sleep 0.1 seconds

From: Date: Fri, 16 Feb 2024 08:36:55 +0000
Subject: Re: int|float for sleep? sleep(0.1) => sleep 0.1 seconds
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-122402@lists.php.net to get a copy of this message
On Fri, Feb 16, 2024 at 10:18 AM Hans Henrik Bergan <hans@loltek.net> wrote: > Can we make sleep accept int|float? > Made a PR: https://github.com/php/php-src/pull/13401 > > For years when I wanted to sleep for 0.1 seconds, it annoyed me that I > couldn't do > sleep(0.1); > instead I had to do > `usleep(figure out how many microseconds there are in 0.1 seconds and put > it here);` > > Based on previous discussions https://externals.io/message/111448 it seems the desired way was for a RFC to be created for this change, as it involves some small changes that break BC. There is also the PR done by Michael Voříšek from 3.5 years ago where some technical discussions took place: https://github.com/php/php-src/pull/5961 Regards, Alex

« previous php.internals (#122402) next »