Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119953 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 7812 invoked from network); 12 Apr 2023 12:25:44 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 12 Apr 2023 12:25:44 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 6B5FA180503 for ; Wed, 12 Apr 2023 05:25:43 -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.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,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-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) (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 ; Wed, 12 Apr 2023 05:25:42 -0700 (PDT) Received: by mail-ej1-f50.google.com with SMTP id gb34so28519154ejc.12 for ; Wed, 12 Apr 2023 05:25:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=groot-jebbink-nl.20210112.gappssmtp.com; s=20210112; t=1681302341; x=1683894341; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=PmapvZRxrilZmVyAesENYrNrBzxkVGVj7+xhMROzACY=; b=fvaUgzBxgvX9fZkksVyLEp5WGOlMuarXJH0Rqi+kXNx3MwXyKG5aLMnaqKwJiCpCy4 aH7kSMGjo92n7z/XztXHNYlJ3OY/b5QG1R18fqARAHYdWSOmkoJ3g1xerbzs8XvjVJSo ihYz0/fSlV3CWqOS8V54t+jjLMYDg/ZLsLpg4RbTItN9o8jlEITGRr/zb+akeq7QR/Rm ZH0xzlfjj/Ql2atBkyvOhPzbu/2x/OrcYxtJFA1V84MJ3dad6I8gsWnKeCYC5news992 GfrZTDOck5xiFNtOzvwBK3JFQ4Pp7d+fLYJwVLGoaJGoR6WtgZJ+L6tJbgSqyMoAhu05 yJSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681302341; x=1683894341; h=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=PmapvZRxrilZmVyAesENYrNrBzxkVGVj7+xhMROzACY=; b=PL3ZifmUrLcioamrwguOF7v9x8HpwbfNDDHsaTSE6VKrIocaZxQoZSA2Are7s/X76G 2Zmu1WHIxR8QbsUGQWLpBqsSzeIgidPOdPYY3uSe+RpTvNI1vjBAUFxa7lEQFaXGxjiz a0zgYFaf+GtOyEMYgECCQxZj3D2V0zhd9oKPcmRQ+TTj0Eiv2P9/YnJtvkgWXxGxlm6U eqTjnDequqNw4daTixTWB5m6ZKl+cNCSTmseq7TCu36FgJ5gV5tr7PsoqWDVW++fZ65J Jtc2XJMRymUzoUVSENb4GaFFMi+FrgDd1tlG1SBumFEm5zxogRDFx4LmqSD5AviprXgl oayw== X-Gm-Message-State: AAQBX9e9clqXuXRKHVvZ1moCiJG3lEAUbXL5PyQKoP1KnVz3G5/TJ2N3 HzXd9R9MdNaB9NAxSaxQw245NWHQhLTSoqsVmTPwvJcIF0A1gWmi X-Google-Smtp-Source: AKy350a971RrNeEEOm9vgwoVdQ3rbMl2c8t0dYZdIUHdCFe9qoUNsSeHfmg9ORGoc35hHobS9OtdqN6QTOQdx928BBw= X-Received: by 2002:a17:906:a990:b0:93d:6382:d5b with SMTP id jr16-20020a170906a99000b0093d63820d5bmr6237229ejb.9.1681302340713; Wed, 12 Apr 2023 05:25:40 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 12 Apr 2023 14:25:29 +0200 Message-ID: To: internals@lists.php.net Content-Type: multipart/alternative; boundary="000000000000c7512e05f922b4d9" Subject: Re: Possible RFC: $_SERVER['REQUEST_TIME_FLOAT'] From: herbert@groot.jebbink.nl (Herbert Groot Jebbink) --000000000000c7512e05f922b4d9 Content-Type: text/plain; charset="UTF-8" On Wed, 12 Apr 2023 at 11:53, Rowan Tommins wrote: > Should the same approach happen here? e.g. should all three > values be based on hrtime fallback for REQUEST_TIME and REQUEST_TIME_FLOAT to hrtime seems not possible, hrtime is not based on the actual time, hrtime can be used to calculate a duration or so, not to retrieve the actual time itself. The reason that I want to migrate from microtime(true) to hrtime(true) is described in the comment in the PHP manual for hrtime: "This function is particularly necessary on VMs running on KVM, XEN (openstack, AWS EC2, etc) when timing execution times. On these platforms which lack vDSO the common method of using time() or microtime() can dramatically increase CPU/execution time due to the context switching from userland to kernel when running the `gettimeofday()` system call." This migration is almost done, except in the case when it is used together with REQUEST_TIME_FLOAT, that's the trigger for this possible RFC. The extra precision is a bonus, but in my use case not needed. (in fact I remove it so that old code still works) --000000000000c7512e05f922b4d9--