Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122402 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 8BE1D1ADA70 for ; Sat, 17 Feb 2024 07:44:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1708147306; bh=shMcFdSGhlmMTkgPyfT91BtE1roAUQwgZIq7BlWHouM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=fvmvpv5utFylOMSi2xZCwLJJNILdLXTX6BhnzRQ6TgNB91DkHAu1ErtkmpfNxr399 hpSsJa5qraZ14NkrdsjQaydDD3RQRJBzIKluWxCOuylfZ84PCB4Sdkrfw5pSSw/SVh j3MZHC4lw9bd1PQRJE22cMZj6+542j3V5EYlAxGB2Ox55D1syTWHFlF5cVi4FNFeoS LRK1ndN3fx0E80e+IQyC1P2HekPjRU1WcIhHmK62vz5AhODLd2rWUQBV5I2pdYaU3A MWn8WBYvHLsQRG8P0Z0p4pmF/df/Cx1Jm1u0RhK7IhF9nFmzOOlNwMvB4wXNE+vbNG cppiBqAeJnvbA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id CEE0318020B for ; Fri, 16 Feb 2024 21:21:45 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_05,DATE_IN_PAST_12_24, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS, FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 16 Feb 2024 21:21:45 -0800 (PST) Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-6e2775c377aso191737b3a.2 for ; Fri, 16 Feb 2024 21:21:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708147302; x=1708752102; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=shMcFdSGhlmMTkgPyfT91BtE1roAUQwgZIq7BlWHouM=; b=JybUXWfv1CqA7y9ZcgDMOmHz2u9MVfZH/0GTWhCz5UGyV+FQqvuA5oqXTriEK+EJuU 5lIUC2gWA8jxcz5NMpW/C+7wbIbai8Itej5DKi2rQAIMQshSmvAy5LHw16nNfyRiMxUl yDmCo1KB5qqCjzDyTROht+tBenkBRfHXWqaXVlcXe6clCl7CSFk82/BfVa6HHNHp5IEU wd31raUS5t7A1jp8c/1yKqbIN2zjEoO2sARqx+/SKMS87Jmu3lO2aCq0L7K/4bOZTqTy ZQGD9PuYDDQoQZJ8nELVaNMQDppCZ+i35EQ7aQFp87CLCkIXIRQxQhzgx7T0zywGBafH cJJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708147302; x=1708752102; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=shMcFdSGhlmMTkgPyfT91BtE1roAUQwgZIq7BlWHouM=; b=GD90iRAL08z/UQbQcmh35Qs9XY4Ed/jhyoQ/SvFDVIOXpuRM/TPs/444xi99og/HqL w0KOQzVcqD4wTJzaGmozzwHDrvtSYbmcRHVras36g3PliamF+OLcerAJr0/HiN0sSKpv WVoG0GTYh9SYHzZSsjvtyDw9G94w8gnG1dq7keJPh1yAnu+evDIuS4qqJ/AHrjirgyJN 3qjVovaTAdD4TeXFu7xikABftl/xgqLUS9JHwrLg4WvsC6vQ9LrIWhYVXmaBYdO29XPR r8I3fnrtMP5Xz05takmcfZo+aaJqqyb51Hya9FXHi0Tq2omYFifb+QqWD8bquxDo7rNR 0o5g== X-Gm-Message-State: AOJu0YxvYnDmAGCrZwNp6O2o8MQyv2mZZbZaVvsAKF7EHNLOmEeiaNjR 4bX1HKCaT1dCiWKXCBYE2gEWcFgjDZa5fFBgS9j1qNGrVb9Mjj5hRyRF+ElgVqKkqRBQMSg/spT AhdiFQ103/xknQfXj9/9sh+V0VzV9WexrGJuJTtPT X-Google-Smtp-Source: AGHT+IFbHEommRxOzAccTsGbKSbalazPNwNyeB3dN3pTDAQyA6f3CZtkXAFpRaeITL2qSlQ1IZcZWDJ9vrPXxVRWiYA= X-Received: by 2002:a81:6e05:0:b0:607:cd26:8327 with SMTP id j5-20020a816e05000000b00607cd268327mr4038872ywc.20.1708072632002; Fri, 16 Feb 2024 00:37:12 -0800 (PST) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 16 Feb 2024 10:36:55 +0200 Message-ID: Subject: Re: [PHP-DEV] int|float for sleep? sleep(0.1) => sleep 0.1 seconds To: Hans Henrik Bergan Cc: PHP Internals List Content-Type: multipart/alternative; boundary="0000000000007b2eaa06117ba68c" From: drealecs@gmail.com (=?UTF-8?Q?Alexandru_P=C4=83tr=C4=83nescu?=) --0000000000007b2eaa06117ba68c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Feb 16, 2024 at 10:18=E2=80=AFAM Hans Henrik Bergan 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=C5=99=C3=AD=C5=A1ek from 3.5 years = ago where some technical discussions took place: https://github.com/php/php-src/pull/5961 Regards, Alex --0000000000007b2eaa06117ba68c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

On Fri, Feb 16, 2024 at 10:18=E2=80=AFAM = 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

<= /div>
For years when I wanted to sleep for 0.1 seconds, it annoyed me t= hat 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);= `

=C2=A0
B= ased on previous discussions=C2=A0https://externals.io/message/111448
it seem= s the desired way was for a RFC to be created for this change, as it involv= es some small changes that break BC.

There is also= the PR done by=C2=A0Michael Vo=C5=99=C3=AD=C5=A1ek from 3.5 years=C2=A0ago= where some technical discussions took place:


--0000000000007b2eaa06117ba68c--