Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119952 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 5005 invoked from network); 12 Apr 2023 11:54:00 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 12 Apr 2023 11:54:00 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E3919180511 for ; Wed, 12 Apr 2023 04:53:56 -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=-0.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, PDS_OTHER_BAD_TLD,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-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (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 04:53:56 -0700 (PDT) Received: by mail-wr1-f45.google.com with SMTP id e7so523877wrc.12 for ; Wed, 12 Apr 2023 04:53:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681300435; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=4Jl8TUmtoOOBYN+jJ4LS/67lXezjpEb/WQFIRWvUssI=; b=VY2VJJaHEBjchpG6Gi09Uxcn9TnMMKB7waFWTDApSrMdkNAaQcnqWXE/7TI5Ko54fC MeOgSRKRrwU7j+v7poFZitXDtA6YD4h7FDSYeFxqPFqAp10Mys5H/LzvJX5ZwUzxoDSl UHk5Cas8tKQ3LFvw+O4NnJVqSYUg9bLYgWiAelu+3TZovE1gKYhx+L0jJXvX9/r73N8a 7Nn3l87nQ+Ic4nZbG3TRJiyBzM9+d1m39JC8EVeh791aOJAaAVCVu/7NeL2M3NWP6LC+ 5x8KM4kZ+S9QkMekb0MdsTMDThSzoABb/XNXkk1s9q/P6wdFdJGh2SFVZGtcRnj4MYBp YcZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681300435; 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=4Jl8TUmtoOOBYN+jJ4LS/67lXezjpEb/WQFIRWvUssI=; b=CmsVtPkXepjAZuFhdhcN/mrp7zt+M/otE1OvecritrWg66MQDEt9Z7d2/EXtjFqg8k AVY1xLrbXxkCBE1KrLCMA/BOXByn5UiLlVmegpLjNS/CKJyg73OB75vylYEequUVfbHl PUH86rUc8/pbIsIKiiW5xNDcadyO1e7E2nLCcgOByREaVpc9rgkaxBYDGfFmeAQqMtVd 5lT3sKjVEYLCaeOti+goJs0YApFFnxRXpQDfW+axuSEMKw/SEG5uuhqs2B9NY0RSwp1a 1SGnaZC6lfAkeqw7Vxd9txtG7zQd66k3NoOtFFVZJsULbGom7/myk7BCJSLgoAjh+twx DWUg== X-Gm-Message-State: AAQBX9dpSmwI7L9BdpbWUpvXhOJA4F5oG5VgVYGARPCIwFsP5QQQm0x4 /P0TeGYTGI3CQMWCwEne+oQsjCU7gwTZwpDN3854Obceass= X-Google-Smtp-Source: AKy350Yhoi9NTWTmk2k8yOPYt6hY2wimmy2ZbxpD4aj1UKPX4dUx1Dlse0r27DD72f2x8LmKkFoB3xyZ7gZzXMBQ2cM= X-Received: by 2002:adf:fa4c:0:b0:2f1:ca46:bd2a with SMTP id y12-20020adffa4c000000b002f1ca46bd2amr1733449wrr.6.1681300435011; Wed, 12 Apr 2023 04:53:55 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 12 Apr 2023 12:53:42 +0100 Message-ID: To: internals@lists.php.net Content-Type: multipart/alternative; boundary="000000000000308bc805f9224352" Subject: Re: [PHP-DEV] Possible RFC: $_SERVER['REQUEST_TIME_FLOAT'] From: rowan.collins@gmail.com (Rowan Tommins) --000000000000308bc805f9224352 Content-Type: text/plain; charset="UTF-8" On Wed, 12 Apr 2023 at 11:01, Herbert Groot Jebbink < herbert@groot.jebbink.nl> wrote: > > I'm in the process of using hrtime(true) instead of microtime(true), for > this it would be great if REQUEST_TIME_HR would also exist next to > REQUEST_TIME and REQUEST_TIME_FLOAT Hi :) The idea sounds reasonable on the face of it. Are there any performance issues calling hrtime on every request (possibly platform-specific)? I note that the existing values are not fetched directly from a time source, but have some logic for SAPIs to provide a value [1] e.g. from the Apache request context [2], and then REQUEST_TIME is just REQUEST_TIME_FLOAT truncated to integer. Should the same approach happen here? e.g. should all three values be based on hrtime if the SAPI does not provide a value? Would we even need an extra value if REQUEST_TIME_FLOAT had enough precision? [1] https://heap.space/xref/php-src/main/SAPI.c?r=9d5f2f13#1085 [2] https://heap.space/xref/php-src/sapi/apache2handler/sapi_apache2.c?r=4da0da7f#371 Regards, -- Rowan Tommins [IMSoP] --000000000000308bc805f9224352--