From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 16230 invoked from network); 14 Oct 2021 18:48:42 -0000 Received: from tb-ob20.topicbox.com (173.228.157.66) by inbox.vuxu.org with ESMTPUTF8; 14 Oct 2021 18:48:42 -0000 Received: from tb-mx0.topicbox.com (tb-mx0.nyi.icgroup.com [10.90.30.73]) by tb-ob20.topicbox.com (Postfix) with ESMTP id D97A51A68E for ; Thu, 14 Oct 2021 14:48:39 -0400 (EDT) (envelope-from bounce.mMf72f1806b8d3aa8b52f6e895.r522be890-2105-11eb-b15e-8d699134e1fa@9fans.bounce.topicbox.com) Received: by tb-mx0.topicbox.com (Postfix, from userid 1132) id C05A443112C2; Thu, 14 Oct 2021 14:48:39 -0400 (EDT) ARC-Authentication-Results: i=2; topicbox.com; arc=pass; dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=nnSygicB header.a=rsa-sha256 header.s=20210112 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; spf=pass smtp.mailfrom=conor.williams@gmail.com smtp.helo=mail-ot1-f54.google.com; x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (body has been altered)) (Message modified while forwarding at Topicbox) ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=mime-version:references:in-reply-to:from:date :message-id:subject:to:content-type:list-help:list-id:list-post :list-subscribe:reply-to:content-transfer-encoding :list-unsubscribe; s=sysmsg-1; t=1634237319; bh=ryEER7ExOP4I3XXW PragmHNXrUhwtunTNM5dzrUrz3E=; b=eUHihPQNh7JaW8iiwhgHbEtLI9qQJMlM W9jlsw/uITMTKOjQR8MxsV+pvVTPDGHrgDF7c1yrRLp4brtT0NkdXkj3UOWbc3bI FRTTx84MhCP0HACnKoWsH02IqO7csJ/1svV4o16Al3tXevLRcLxW6aX76eILcAI8 M52sxAz9MwE= ARC-Seal: i=2; a=rsa-sha256; cv=pass; d=topicbox.com; s=sysmsg-1; t= 1634237319; b=rf05xFt3UJJ73vn7Jt5rS8BbYw0TcdQ6PzhMv12C37hfPBGAH6 ITuLbqwxexXMVuX86yA6bIbXfyYz0N8Hadw8ANOzx7IID072dWvoLLSb+yiwJPhl uYqYZMahNb2E+R+pkhYODz1u0q1EXSAq9/xSPTKaj3goOb+OeaQI5UOHA= Authentication-Results: topicbox.com; arc=pass; dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=nnSygicB header.a=rsa-sha256 header.s=20210112 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; spf=pass smtp.mailfrom=conor.williams@gmail.com smtp.helo=mail-ot1-f54.google.com; x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (body has been altered)) (Message modified while forwarding at Topicbox) X-Received-Authentication-Results: tb-mx1.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC Policy is not at enforcement); dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=nnSygicB header.a=rsa-sha256 header.s=20210112 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; iprev=pass smtp.remote-ip=209.85.210.54 (mail-ot1-f54.google.com); spf=pass smtp.mailfrom=conor.williams@gmail.com smtp.helo=mail-ot1-f54.google.com; x-aligned-from=pass (Address match); x-google-dkim=pass (2048-bit rsa key) header.d=1e100.net header.i=@1e100.net header.b=FSIg+gY8; x-me-sender=none; x-ptr=pass smtp.helo=mail-ot1-f54.google.com policy.ptr=mail-ot1-f54.google.com; x-return-mx=pass header.domain=gmail.com policy.is_org=yes (MX Records found: alt1.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com); x-return-mx=pass smtp.domain=gmail.com policy.is_org=yes (MX Records found: alt1.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=0 state=0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=9fans.net; h= mime-version:references:in-reply-to:from:date:message-id:subject :to:content-type:list-help:list-id:list-post:list-subscribe :reply-to:content-transfer-encoding:list-unsubscribe; s=dkim-1; bh=4TkuFtfcfvXwE9qbZUKS79jx4H0I4o+4PxLTzLAPij8=; b=hDDMuh3II7b7 Qrfpr8QqdwGESm5ToyWwi4h648BZB7qyNQQ0GJf65gNbNM7Dx5OZzSboBIp6zpBw cV7w1t9RoB3ETsQXMM9q776wbE+aaRwYx47AWfEwx7DqwVz5BEjDwMPaNpZaZd2C Wx5zAyrWeTPlI99hQAt6rRI+b8AYSvc= Received: from tb-mx1.topicbox.com (localhost.local [127.0.0.1]) by tb-mx1.topicbox.com (Postfix) with ESMTP id 766872442E1 for <9fans@9fans.net>; Thu, 14 Oct 2021 14:48:22 -0400 (EDT) (envelope-from conor.williams@gmail.com) Received: from tb-mx1.topicbox.com (localhost [127.0.0.1]) by tb-mx1.topicbox.com (Authentication Milter) with ESMTP id E1E5B651592; Thu, 14 Oct 2021 14:48:22 -0400 ARC-Seal: i=1; a=rsa-sha256; cv=none; d=topicbox.com; s=arcseal; t= 1634237302; b=Mw1x52wdG++e0g57Tln5gAuLE4uEZStKfuJOmus2LuG9AXoymU jYgnNzCmDKoRpx/uom3BaPjmYOJ3UDU/4jFao7d6qQ0R18i3Bi4RnE7XNyCGu/8P Qzc9xHrnD+aN5g0N1fuYzAZvs9qzhKyASpHvU4OkmsTLgVijao89et0Af4nUKrLy oZHJQTWBOq/SonA/WvHULNosUrU4ARqpiuS26aBoMW85v2Cwkc9PmtzMQJLFNFOK 1lIDjvq14xM9tWVLn6PxCzJ/N/lRNgoXztfDafeSmD706bxZjujjW+8682zg6gXT Wh+0CH7i5T9R/d7+NBHG3YxYS2DthB0PbOGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=mime-version:references:in-reply-to:from:date :message-id:subject:to:content-type; s=arcseal; t=1634237302; bh=UpNuJQYExYIteO0uBYY74CciUsDVplAY2XFl11320Ko=; b=X/Rkex6PCz8m umhRvtCWVl6NGiSugrFxwv6VQYfX7jMgqnFyegD1M1Zog6cEsDLNCDpOO4OwZKdG v6uUfqdz6LI27z91m2k4wQ4EKyVjfC3EV3qxVIWWUynfxKDtEEB2pq3FNsfbwMCL 9UKdUcTrMC9ZNdtKnXc+Y5DL0sV5JQ/AMUAKnaX4rgB+H7k0yTeAmR84KIA2nO0y RqBR1eefNJnG5J2NGWkqIDxmRwvfYrwVVkukS6UlL0VvGnpLHk8jcErAjmUEUSPy kF4LE9WXx8g4h4kr7Qv6rMMpqXVZBnxcmrYDJqCn0zx5LypC5jyDdmc48D0NdZU+ jqEF7H0Kew== ARC-Authentication-Results: i=1; tb-mx1.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC Policy is not at enforcement); dkim=pass (2048-bit rsa key sha256) header.d=gmail.com header.i=@gmail.com header.b=nnSygicB header.a=rsa-sha256 header.s=20210112 x-bits=2048; dmarc=pass policy.published-domain-policy=none policy.published-subdomain-policy=quarantine policy.applied-disposition=none policy.evaluated-disposition=none (p=none,sp=quarantine,d=none,d.eval=none) policy.policy-from=p header.from=gmail.com; iprev=pass smtp.remote-ip=209.85.210.54 (mail-ot1-f54.google.com); spf=pass smtp.mailfrom=conor.williams@gmail.com smtp.helo=mail-ot1-f54.google.com; x-aligned-from=pass (Address match); x-google-dkim=pass (2048-bit rsa key) header.d=1e100.net header.i=@1e100.net header.b=FSIg+gY8; x-me-sender=none; x-ptr=pass smtp.helo=mail-ot1-f54.google.com policy.ptr=mail-ot1-f54.google.com; x-return-mx=pass header.domain=gmail.com policy.is_org=yes (MX Records found: alt1.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com); x-return-mx=pass smtp.domain=gmail.com policy.is_org=yes (MX Records found: alt1.gmail-smtp-in.l.google.com,alt3.gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com); x-tls=pass smtp.version=TLSv1.2 smtp.cipher=ECDHE-RSA-AES256-GCM-SHA384 smtp.bits=256/256; x-vs=clean score=0 state=0 X-ME-VSCause: gggruggvucftvghtrhhoucdtuddrgedvtddrvdduvddguddutdculddtuddrgeduhedrtd dtmdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggft fghnshhusghstghrihgsvgdpuffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftd dtnecunecujfgurhepgghfjgfhfffkuffvtgesrgdtreertddtjeenucfhrhhomhepveho nhhorhcuhghilhhlihgrmhhsuceotghonhhorhdrfihilhhlihgrmhhssehgmhgrihhlrd gtohhmqeenucggtffrrghtthgvrhhnpeeuteduudffheekkeehjeevgedvueevffekueeh ueduveehtdetudeihefhieehtdenucffohhmrghinhepkhgvrhhgihhsrdgtohhmpdhssg hfrgdrfhhrpdhtohhpihgtsghogidrtghomhenucfkphepvddtledrkeehrddvuddtrdeh geenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvtdelrdekhe drvddutddrheegpdhhvghlohepmhgrihhlqdhothduqdhfheegrdhgohhoghhlvgdrtgho mhdpmhgrihhlfhhrohhmpeeotghonhhorhdrfihilhhlihgrmhhssehgmhgrihhlrdgtoh hmqe X-ME-VSScore: 0 X-ME-VSCategory: clean Received-SPF: pass (gmail.com ... _spf.google.com: Sender is authorized to use 'conor.williams@gmail.com' in 'mfrom' identity (mechanism 'include:_netblocks.google.com' matched)) receiver=tb-mx1.topicbox.com; identity=mailfrom; envelope-from="conor.williams@gmail.com"; helo=mail-ot1-f54.google.com; client-ip=209.85.210.54 Received: from mail-ot1-f54.google.com (mail-ot1-f54.google.com [209.85.210.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tb-mx1.topicbox.com (Postfix) with ESMTPS for <9fans@9fans.net>; Thu, 14 Oct 2021 14:48:21 -0400 (EDT) (envelope-from conor.williams@gmail.com) Received: by mail-ot1-f54.google.com with SMTP id w12-20020a056830410c00b0054e7ceecd88so9570826ott.2 for <9fans@9fans.net>; Thu, 14 Oct 2021 11:48:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=UpNuJQYExYIteO0uBYY74CciUsDVplAY2XFl11320Ko=; b=FSIg+gY8bxRZSkklSPjeufjLeysGqwlaW00uuWMH8qU/qAf+WMj8jncIs90G2+V3iL IEbiERqYCJATxgq/1XAxbm0YraukoFGYIZwPs5kqdgarQ5nmkmCd+3H89Nyafi8PQjWE 1r/3GVYrBn4FHJSdrOJdcwkxhFm3t9eEZmAzXhGgKvDf9LXVovBVlac57KO4cwDaSHWR HdhWNlrMtKxEXfOyAssfYio3GGbJ2GdaAG7GIMyMkC785ufKyXTTn1NOlSx1LK38Xg/0 ypQvMorLg8m/foqkIROXmHAkreL/Y0IfjFtjq7kvvplexyi2mWmlOIwokbVKJ17ZifMa vZ2g== X-Gm-Message-State: AOAM532MVUjPE41Fwhd5+t1bjrOx+rAuMo9Awi54myCAppF54Opav6Lw ogDL7+blD67Tnk7qsJWq5+iLLI82FprbrsjXzB3wXouWxnA= X-Google-Smtp-Source: ABdhPJw4ZKnpgVGW3NAM29mNkTDM0V4DlOgMXjAnRUfyOsnF34WRoLnEymd9oxBoMgQeqWeR0BP3rparveGMjcvSfHQ= X-Received: by 2002:a05:6830:1c74:: with SMTP id s20mr4071505otg.235.1634237301084; Thu, 14 Oct 2021 11:48:21 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Conor Williams Date: Thu, 14 Oct 2021 18:48:08 +0000 Message-ID: Subject: Re: [9fans] Re: APE:sys/time.h: long instead of suseconds_t To: 9fans <9fans@9fans.net> Content-Type: multipart/alternative; boundary="000000000000cf565705ce548565" Topicbox-Policy-Reasoning: allow: sender is a member Topicbox-Message-UUID: 51503fc6-2d1f-11ec-940b-9a411849af97 Archived-At: =?UTF-8?B?PGh0dHBzOi8vOWZhbnMudG9waWNib3guY29tL2dyb3Vwcy85?= =?UTF-8?B?ZmFucy9UMjMyYjcxNzYzNTJjMDEyYi1NZjcyZjE4MDZiOGQzYWE4YjUyZjZl?= =?UTF-8?B?ODk1Pg==?= List-Help: List-Id: "9fans" <9fans.9fans.net> List-Post: List-Software: Topicbox v0 List-Subscribe: Precedence: list Reply-To: 9fans <9fans@9fans.net> Content-Transfer-Encoding: 7bit List-Unsubscribe: , Topicbox-Delivery-ID: 2:9fans:437d30aa-c441-11e9-8a57-d036212d11b0:522be890-2105-11eb-b15e-8d699134e1fa:Mf72f1806b8d3aa8b52f6e895:1:ZjpJl7R3Hn7pSD-atqLBscQMEhPTvv-QBLuKmogQDvw --000000000000cf565705ce548565 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable yeah, that's exactly it... well done man... good stuff ta failte roimhat... /c:20211410:1900 On Thu, Oct 14, 2021 at 6:31 PM wrote: > Le Thu, Oct 14, 2021 at 06:11:54PM +0000, Conor Williams a =C3=A9crit : > > surely you can shift a 64 bit long? > > > > In fact, I have read cursorily the man page and misread "the time is > expressed in seconds and microseconds since EPOCH" to mean "expressed > in seconds AND expressed in microseconds" while there is a structure > because there is the integer (seconds) part and the fractional > (microseconds) part. Hum... > > So, yes, the result (in microseconds) can be hold in a long long. > > And for long instead of suseconds_t, I'm probably the only one who will > ever directly use suseconds_t in the code for a variable thinking it is > like the result of nsec(2) and it is probably a type that will never > appear in real user code. > > So let this RIP. > > > On Thu, Oct 14, 2021 at 6:04 PM wrote: > > > > > Le Thu, Oct 14, 2021 at 07:56:37PM +0200, tlaronde a =C3=A9crit : > > > > As suggested by ori@eigenstate.org, I have used gettimeofday(2) to > > > > achieve what I needed. > > > > > > > > But I had to change suseconds_t (in POSIX) to long (in Plan9 > > > > ape/include/sys/time.h). > > > > > > > > But are all the compilers in Plan9 making long an octabytes, whatev= er > > > > the arch and the machine? Because a long, if it is a tetra, will > never > > > > hold the value... > > > > > > I misread: the microseconds are for the fractional part. I was still > > > focusing on nsec() and taking the one for the other. > > > > > > But the following still holds: > > > > > > > > > > > Furthermore, for portability, there should be a typedef associating > > > > suseconds_t to long (or vlong, if long is not guaranteed to be an > > > > octa). > > > > > > > -- > > > Thierry Laronde > > > http://www.kergis.com/ > > > http://kertex.kergis.com/ > > > http://www.sbfa.fr/ > > > Key fingerprint =3D 0FF7 E906 FBAF FE95 FD89 250D 52B1 AE95 6006 F40C >=20 > -- > Thierry Laronde > http://www.kergis.com/ > http://kertex.kergis.com/ > http://www.sbfa.fr/ > Key fingerprint =3D 0FF7 E906 FBAF FE95 FD89 250D 52B1 AE95 6006 F40C ------------------------------------------ 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/T232b7176352c012b-Mf72f1= 806b8d3aa8b52f6e895 Delivery options: https://9fans.topicbox.com/groups/9fans/subscription --000000000000cf565705ce548565 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
yeah, that's exactly it... well done = man... good stuff ta failte roimhat...

/c:202114= 10:1900

On Thu, Oct 14, 2021 at 6:31 PM <tlaronde@polynum.com> wrote:
Le Thu, Oct 14, 2021 at 06:11:5= 4PM +0000, Conor Williams a écrit :
> surely you can shift a 64 bit long?
>

In fact, I have read cursorily the man page and misread "the time is expressed in seconds and microseconds since EPOCH" to mean "expre= ssed
in seconds AND expressed in microseconds" while there is a structure because there is the integer (seconds) part and the fractional
(microseconds) part. Hum...

So, yes, the result (in microseconds) can be hold in a long long.

And for long instead of suseconds_t, I'm probably the only one who will=
ever directly use suseconds_t in the code for a variable thinking it is
like the result of nsec(2) and it is probably a type that will never
appear in real user code.

So let this RIP.

> On Thu, Oct 14, 2021 at 6:04 PM <tlaronde@polynum.com> wrote:
>
> > Le Thu, Oct 14, 2021 at 07:56:37PM +0200, tlaronde a écrit= :
> > > As suggested by ori@eigenstate.org, I have used gettimeofday(2) to
> > > achieve what I needed.
> > >
> > > But I had to change suseconds_t (in POSIX) to long (in Plan9=
> > > ape/include/sys/time.h).
> > >
> > > But are all the compilers in Plan9 making long an octabytes,= whatever
> > > the arch and the machine? Because a long, if it is a tetra, = will never
> > > hold the value...
> >
> > I misread: the microseconds are for the fractional part. I was st= ill
> > focusing on nsec() and taking the one for the other.
> >
> > But the following still holds:
> >
> > >
> > > Furthermore, for portability, there should be a typedef asso= ciating
> > > suseconds_t to long (or vlong, if long is not guaranteed to = be an
> > > octa).
> > >
> > --
> > Thierry Laronde <tlaronde +AT+ polynum +dot+ com>
> >              http://www.kergis.co= m/
> >             http://kertex.kerg= is.com/
> >                http://www.sbfa.= fr/
> > Key fingerprint =3D 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95= 6006 F40C

--
        Thierry Laronde <tlaronde +AT+ polynum +dot+= com>
                     = ;ht= tp://www.kergis.com/
                    http:= //kertex.kergis.com/
                     = ;  http://www.sbfa.fr/
Key fingerprint =3D 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C=

------------------------------------------
9fans: 9fans
Permalink: https:= //9fans.topicbox.com/groups/9fans/T232b7176352c012b-M86b19184ee7cf17b00f558= 09
Delivery options: https://9fans.topicbox.com/gro= ups/9fans/subscription
= --000000000000cf565705ce548565--