Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:97744 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 91011 invoked from network); 13 Jan 2017 15:46:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Jan 2017 15:46:21 -0000 Authentication-Results: pb1.pair.com header.from=me@kelunik.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=me@kelunik.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain kelunik.com from 81.169.146.216 cause and error) X-PHP-List-Original-Sender: me@kelunik.com X-Host-Fingerprint: 81.169.146.216 mo4-p00-ob.smtp.rzone.de Received: from [81.169.146.216] ([81.169.146.216:14706] helo=mo4-p00-ob.smtp.rzone.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 44/E2-00729-A46F8785 for ; Fri, 13 Jan 2017 10:46:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1484322374; l=3431; s=domk; d=kelunik.com; h=Content-Type:Cc:To:Subject:Date:From:References:In-Reply-To: MIME-Version; bh=brVz4SAp5FwmghE2q5uZdNOGGaFpN+bbU7US4RUepg0=; b=Ik97IRvXHjB4klVNf2mRmbg3dZwysXgFKuV92HqSxS4vvJYoTh5/qen6wl/jR1f9K2 ju/tEbxNK9PrhmTCOfIK6zyTSFHJmNC00WehzWAITYUO88Gxr6mctXJoCm5NfA+L1zVO uxr2uDMqbcxAwxtH1BFNUyvmNjER7EIscuw3k= X-RZG-AUTH: :IWkkfkWkbvHsXQGmRYmUo9mls2vWuiu+7SLDup6E67mzuoBPBqD/tsM= X-RZG-CLASS-ID: mo00 Received: from mail-qk0-f176.google.com ([209.85.220.176]) by smtp.strato.de (RZmta 39.11 AUTH) with ESMTPSA id V0a8bat0DFkE066 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp384r1 with 384 ECDH bits, eq. 7680 bits RSA)) (Client did not present a certificate) for ; Fri, 13 Jan 2017 16:46:14 +0100 (CET) Received: by mail-qk0-f176.google.com with SMTP id a20so58073274qkc.1 for ; Fri, 13 Jan 2017 07:46:14 -0800 (PST) X-Gm-Message-State: AIkVDXJRemNzQ5640OlP8OPUpUai1enlEfiwaDkFlCYPMah2XK/pGHAB+2lP9PhiKjYJ+ZDIy9OvoxSRurHFOw== X-Received: by 10.55.103.214 with SMTP id b205mr18729783qkc.142.1484322373941; Fri, 13 Jan 2017 07:46:13 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.141.204 with HTTP; Fri, 13 Jan 2017 07:46:13 -0800 (PST) In-Reply-To: References: <146cbb21-72cf-ed65-095a-43a7420482fc@php.net> <02c901d2684e$d1ee2a30$75ca7e90$@belski.net> Date: Fri, 13 Jan 2017 16:46:13 +0100 X-Gmail-Original-Message-ID: Message-ID: To: Leigh Cc: Anatol Belski , Michael Wallner , PHP Internals , Bob Weinand , Daniel Lowrey Content-Type: multipart/alternative; boundary=94eb2c05980ad4c2470545fbbb2d Subject: Re: [PHP-DEV] Fwd: Monotonic Time From: me@kelunik.com (Niklas Keller) --94eb2c05980ad4c2470545fbbb2d Content-Type: text/plain; charset=UTF-8 2017-01-13 15:06 GMT+01:00 Leigh : > On Fri, 13 Jan 2017 at 09:35 Niklas Keller wrote: > > > Hi Anatol, > > > > Do you think we should merge hrtime into core or add a simple function > just > > like microtime() to ext/standard? > > > > Regards, Niklas > > > > It would be great if it could be a simple function, however it is going to > be difficult to produce something cross-platform and meaningful with a > single function. (I know Anatol has written portable code, I haven't looked > at it but I assume it's wrapping the various structs used by i.e. > performance counters, hrtime, etc.) > > I don't think we can get away from having an object-based implementation to > wrap those internal structs, but I do think this is a useful addition > regardless of how it's presented. > With timer.c it's very easy to have it as one function, in fact it's a simple static method currently doing exactly what I think it should probably do in core as a function. http://svn.php.net/viewvc/pecl/hrtime/trunk/hrtime.c?revision=341600&view=markup < Line 416. Any name suggestions? Regards, Niklas --94eb2c05980ad4c2470545fbbb2d--