Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:121583 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 84622 invoked from network); 4 Nov 2023 14:31:18 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 4 Nov 2023 14:31:18 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 4F90F180087 for ; Sat, 4 Nov 2023 07:31:18 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, 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=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sat, 4 Nov 2023 07:31:17 -0700 (PDT) Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-9be02fcf268so447786766b.3 for ; Sat, 04 Nov 2023 07:31:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699108276; x=1699713076; 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=e8q/IgMlD8blVGJE9dIRVt/R5/yEjisz8Cw5IbF4zgo=; b=sfZPEkdi5b/VBb98SPTtTkh9/MvGOqnvTn2JwfGBY89ilNZhrKlmUu8n7wa1skjnIv ysItd7hSmnzkJpFera0wxOBqVx1og+LWAiAYRDlubxWZXUNLSKvKONQubrxrBhKCFBRG 8Fq75ZrGfNLae2n/nzRSxGXAGovu020lN60XOOH4Kj++JbN5NfwQdcpUyVJums/+Dcte CGaO6m1SNVMgPXltlTiunuxbiaMZUVhSC8XzSM4gGiV/FYQqkKwMLbqhrjQmkE2odUj5 yto8iN1jPNvE8Qd2NV1h/gmSG5azjpTVRBJRnWuBcAaOQlpClTaG9/OA/rjjKrl6bGk1 1OHA== X-Gm-Message-State: AOJu0YwgzwJtpmwaEC74mi6AExast69ipdtpd1YDDbhS1g6rcwgV+RWk wbIf1+SX3k0Fe7pJRt5Xrl/NiXfbTfTDsxoMeUA= X-Google-Smtp-Source: AGHT+IEl26wPivALxmtCvjB04N4YI7KtXSxRGc9ACFFJjd71mkVYBRn1qtdD/AI+cEBisw4BCEhfoPdxhQIpFoB6E7o= X-Received: by 2002:a17:907:96a7:b0:9be:ab38:a362 with SMTP id hd39-20020a17090796a700b009beab38a362mr10192621ejc.46.1699108276355; Sat, 04 Nov 2023 07:31:16 -0700 (PDT) MIME-Version: 1.0 References: <9d9acbd8-0b92-419e-b9c6-d7e35d0748dd@daniil.it> <7443be7f-0e78-49e1-ac2e-e33d04e76247@daniil.it> <5338b761-e03f-4229-8f75-c16e415b65f9@bastelstu.be> In-Reply-To: <5338b761-e03f-4229-8f75-c16e415b65f9@bastelstu.be> Date: Sat, 4 Nov 2023 14:31:05 +0000 Message-ID: To: =?UTF-8?Q?Tim_D=C3=BCsterhus?= Cc: daniil@daniil.it, internals@lists.php.net Content-Type: multipart/alternative; boundary="0000000000003f4520060954796a" Subject: Re: [PHP-DEV] Deprecate posix_times From: bukka@php.net (Jakub Zelenka) --0000000000003f4520060954796a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Nov 4, 2023 at 11:40=E2=80=AFAM Tim D=C3=BCsterhus wrote: > Hi > > On 11/3/23 21:51, Jakub Zelenka wrote: > >> The main reason I would like to see this deprecated is not the fact th= at > >> it's returning a less precise value compared to getrusage, but rather > >> because it's returning a value that cannot be interpreted in any way > >> from pure PHP. > > > > So if the constant is added, which is trivial, then the only reason lef= t > is > > that it's returning slightly less precise value and maybe slightly hard= er > > way to interpret it, right? If so, then I don't think this is enough to > > break BC. It would be much better done using documentation where we > should > > also add a note about the new constant. > > There is no real backwards-compatibility break, because the function was > not correctly usable in the first place. This means that anyone who > currently uses the function already has broken code. > > Well we don't really know how users use that function. If someone takes a look, they can see that the time is not in milliseconds. It basically just uses different unit so it might still be useful for comparison of times if for example it is logged somewhere and then compared or even used as a measure (e.g. for some dashboards). So I certainly still see some valid use cases here. I have just quickly checked docs and it seems to me that it offers some extra info compare to getrusage. Specifically it differentiate between times for current process only and times for process and children. That might be potentially useful for someone using pcntl_fork and similar. In addition it returns total number of ticks from reboot which might have some use cases as well. I'm not sure how this could be replaced by just getrusage. Do I miss anything? Regards Jakub --0000000000003f4520060954796a--