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_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 14442 invoked from network); 14 Oct 2021 18:30:54 -0000 Received: from tb-ob0.topicbox.com (64.147.108.117) by inbox.vuxu.org with ESMTPUTF8; 14 Oct 2021 18:30:54 -0000 Received: from tb-mx0.topicbox.com (tb-mx0.nyi.icgroup.com [10.90.30.73]) by tb-ob0.topicbox.com (Postfix) with ESMTP id E1EC21D740 for ; Thu, 14 Oct 2021 14:30:52 -0400 (EDT) (envelope-from bounce.mM86b19184ee7cf17b00f55809.r522be890-2105-11eb-b15e-8d699134e1fa@9fans.bounce.topicbox.com) Received: by tb-mx0.topicbox.com (Postfix, from userid 1132) id D80E3430F392; Thu, 14 Oct 2021 14:30:52 -0400 (EDT) ARC-Authentication-Results: i=2; topicbox.com; arc=pass; dkim=invalid (public key: not available, 0-bit key sha256) header.d=polynum.com header.i=@polynum.com header.b=m+NQ+5HW header.a=-sha256 header.s=202006 x-bits=0; dmarc=none policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=polynum.com; spf=pass smtp.mailfrom=thierry.laronde@sfr.fr smtp.helo=smtp26.services.sfr.fr; x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (message has been altered)) (Message modified while forwarding at Topicbox) ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=date:from:to:subject:message-id:references :mime-version:content-type:content-transfer-encoding:in-reply-to :list-help:list-id:list-post:list-subscribe:reply-to :list-unsubscribe; s=sysmsg-1; t=1634236252; bh=AzRJX01ULv/DR6p3 LMTFjhaRyCpW8aZqSpYMG9wiJaM=; b=pwpN/OOg/vQrq50WYtpKn4ZSo9Bw/vvQ P/9d1UkXFXZQ8gfYZUMNZOZ6gGpkeCD8oppjsANAwkmAKr0xk6gT27AVTE/rck2h lLM5IPzDEYoA5ZmRzaomZS0Ei8ZUBY6vZlbO1+AQy5SXKx1OjyWRsAVz+Fh4pLI0 1W3Gl+3Y64g= ARC-Seal: i=2; a=rsa-sha256; cv=pass; d=topicbox.com; s=sysmsg-1; t= 1634236252; b=c2dRvBnYT1DoXkGBoz5jRWgT2MNcpqYVbiiz70mOSgfjYZ9h9A gjvHGo33MwPj3eAeG5oPA19yCcjKzzYTqdU7d9GpXRlh1Ols/J518BTv3tLbl3x8 f8VbG74i2JBPSn/RdfeLI10Q/vB+MgEBAKXVlIaIxRlOH704uEv9bvx/E= Authentication-Results: topicbox.com; arc=pass; dkim=invalid (public key: not available, 0-bit key sha256) header.d=polynum.com header.i=@polynum.com header.b=m+NQ+5HW header.a=-sha256 header.s=202006 x-bits=0; dmarc=none policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=polynum.com; spf=pass smtp.mailfrom=thierry.laronde@sfr.fr smtp.helo=smtp26.services.sfr.fr; x-internal-arc=fail (as.1.topicbox.com=pass, ams.1.topicbox.com=fail (message has been altered)) (Message modified while forwarding at Topicbox) X-Received-Authentication-Results: tb-mx0.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC did not pass); dkim=invalid (public key: not available, 0-bit key sha256) header.d=polynum.com header.i=@polynum.com header.b=m+NQ+5HW header.a=-sha256 header.s=202006 x-bits=0; dmarc=none policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=polynum.com; iprev=pass smtp.remote-ip=93.17.128.217 (smtp26.services.sfr.fr); spf=pass smtp.mailfrom=thierry.laronde@sfr.fr smtp.helo=smtp26.services.sfr.fr; x-aligned-from=fail; x-me-sender=none; x-ptr=pass smtp.helo=smtp26.services.sfr.fr policy.ptr=smtp26.services.sfr.fr; x-return-mx=pass header.domain=polynum.com policy.is_org=yes (MX Records found: fb.mail.gandi.net,spool.mail.gandi.net); x-return-mx=pass smtp.domain=sfr.fr policy.is_org=yes (MX Records found: smtp-in.sfr.fr); 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=date:from :to:subject:message-id:references:mime-version:content-type :content-transfer-encoding:in-reply-to:list-help:list-id :list-post:list-subscribe:reply-to:list-unsubscribe; s=dkim-1; bh=mfxTOnhci7eaQ92onHTEcTaWt18dh82cr4201dvyiQg=; b=EtBO9/9/7csh py3JhSa9COqxKnbOEFw1qcLGA+9Dgf6f7lkTluTwxPWGUNqGnikJGQgZGIiYzNjA +ySvRSz7Rxoul/3pTVkgqTpMCDZxOBjMmf5s69BFI5eLIOMSaZW4anzQV7DC1+YO t8hmLxvh95UViH6n4se4afXTvb1xMu0= Received: from tb-mx0.topicbox.com (localhost.local [127.0.0.1]) by tb-mx0.topicbox.com (Postfix) with ESMTP id 564B5430EF39 for <9fans@9fans.net>; Thu, 14 Oct 2021 14:30:43 -0400 (EDT) (envelope-from thierry.laronde@sfr.fr) Received: from tb-mx0.topicbox.com (localhost [127.0.0.1]) by tb-mx0.topicbox.com (Authentication Milter) with ESMTP id 099C2CD4AAA; Thu, 14 Oct 2021 14:30:43 -0400 ARC-Seal: i=1; a=rsa-sha256; cv=none; d=topicbox.com; s=arcseal; t= 1634236243; b=YMPkgZ2GbX0jW9/oSA8LrUlTmtsU5K3IkuZpGB2yd3WrXVDWux gFTaLZTyBx4sjK9qrRXEBHpD8PYXUIX38BimE3Ay/Yfu6njU/KziOsNBpuRaIJo1 Ng6UpWdYYEFVkVpZbYLADEyfMc5xYHahUlw9baJ637dnCtRb9Ul2r+Q+P3cO7H+c Zobczc7vMDXYil8KcOqvEBjQBNtsWTaTiAolPmCejq9ZudaJTzsfbPfYw0MFn61n 8H3+9m3m7aTxxev000XDLGFbFYEj+nrGvtLEyRx+p2+ekW8veNjaZidRgggpAWZ9 JoDOsl26hpMCoH9tp9gNO5fJ05tosW1dLR5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d= topicbox.com; h=date:from:to:subject:message-id:references :mime-version:content-type:content-transfer-encoding :in-reply-to; s=arcseal; t=1634236243; bh=bLeva36g6p7YHBm/ZrDaNO gdWNLHzbBmVEXj7q0Ybsg=; b=PPhBcVlel/kOVshqCDgbFlZSedpSMNw2oQHLjf 9EaQdrV6r/BzE6rLlWKStroSpHB27BIUCL/Xf7yO4TwYvynh44/n5zPh8S3XK2h4 s6OKJCUe9Poakc8NzGt8XS/3QUHbvlVt4vC21AQN0psltYcgerwxaV+BWiKm5Ppa NflKFU3aEG0M64u8bEIEyzOnG/HGt+mv7K7AVPds8MBO11HqnLKvBfxABqFHqxRz aEaT/rra3yhHIsKSV+5SjfwVnNc5EZBob0Ab+l1fSpX6+ttdQdlN5argcuXzkilj pLRQEV+JsCHGobATc35tMKmP0SasZo8Hbt1E/srn3Ee+dRJQ== ARC-Authentication-Results: i=1; tb-mx0.topicbox.com; arc=none (no signatures found); bimi=skipped (DMARC did not pass); dkim=invalid (public key: not available, 0-bit key sha256) header.d=polynum.com header.i=@polynum.com header.b=m+NQ+5HW header.a=-sha256 header.s=202006 x-bits=0; dmarc=none policy.published-domain-policy=none policy.applied-disposition=none policy.evaluated-disposition=none (p=none,d=none,d.eval=none) policy.policy-from=p header.from=polynum.com; iprev=pass smtp.remote-ip=93.17.128.217 (smtp26.services.sfr.fr); spf=pass smtp.mailfrom=thierry.laronde@sfr.fr smtp.helo=smtp26.services.sfr.fr; x-aligned-from=fail; x-me-sender=none; x-ptr=pass smtp.helo=smtp26.services.sfr.fr policy.ptr=smtp26.services.sfr.fr; x-return-mx=pass header.domain=polynum.com policy.is_org=yes (MX Records found: fb.mail.gandi.net,spool.mail.gandi.net); x-return-mx=pass smtp.domain=sfr.fr policy.is_org=yes (MX Records found: smtp-in.sfr.fr); 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: gggruggvucftvghtrhhoucdtuddrgedvtddrvdduvddguddvfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvf fukfhfgggtugfgjgesthekredttddtudenucfhrhhomhepthhlrghrohhnuggvsehpohhl hihnuhhmrdgtohhmnecuggftrfgrthhtvghrnhepiedvjeevgeduuddtgfevgeejvddufe fhteffveevvdfgtdekffeludffgeelueevnecuffhomhgrihhnpehkvghrghhishdrtgho mhdpshgsfhgrrdhfrhdpthhophhitggsohigrdgtohhmnecukfhppeelfedrudejrdduvd ekrddvudejpdejjedrudelkedruddvuddrkeelnecuvehluhhsthgvrhfuihiivgeptden ucfrrghrrghmpehinhgvthepleefrddujedruddvkedrvddujedphhgvlhhopehsmhhtph dviedrshgvrhhvihgtvghsrdhsfhhrrdhfrhdpmhgrihhlfhhrohhmpeeothhhihgvrhhr hidrlhgrrhhonhguvgesshhfrhdrfhhrqe X-ME-VSScore: 0 X-ME-VSCategory: clean Received-SPF: pass (sfr.fr: 93.17.128.217 is authorized to use 'thierry.laronde@sfr.fr' in 'mfrom' identity (mechanism 'ip4:93.17.128.0/24' matched)) receiver=tb-mx0.topicbox.com; identity=mailfrom; envelope-from="thierry.laronde@sfr.fr"; helo=smtp26.services.sfr.fr; client-ip=93.17.128.217 Received: from smtp26.services.sfr.fr (smtp26.services.sfr.fr [93.17.128.217]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tb-mx0.topicbox.com (Postfix) with ESMTPS for <9fans@9fans.net>; Thu, 14 Oct 2021 14:30:42 -0400 (EDT) (envelope-from thierry.laronde@sfr.fr) X-mail-filterd: {"version":"1.3.4","queueID":"872181C001001","contextId":"49831493-723e-4696-b82c-9f22fbe45f9e"} Received: from cauchy.polynum.local (89.121.198.77.rev.sfr.net [77.198.121.89]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by msfrf2641.sfr.fr (SMTP Server) with ESMTPS id 872181C001001 for <9fans@9fans.net>; Thu, 14 Oct 2021 20:30:41 +0200 (CEST) X-mail-filterd: {"version":"1.3.4","queueID":"69F841C000432","contextId":"d56b8272-5a66-4230-b0fd-5a56f4530e2d"} X-sfr-mailing: LEGIT X-sfr-spamrating: 40 X-sfr-spam: not-spam Received: from cauchy.polynum.local (89.121.198.77.rev.sfr.net [77.198.121.89]) by msfrf2641.sfr.fr (SMTP Server) with ESMTP id 69F841C000432 for <9fans@9fans.net>; Thu, 14 Oct 2021 20:30:41 +0200 (CEST) Received: from cauchy.polynum.local (89.121.198.77.rev.sfr.net [77.198.121.89]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by msfrf2641.sfr.fr (SMTP Server) with ESMTPS for <9fans@9fans.net>; Thu, 14 Oct 2021 20:30:39 +0200 (CEST) Received: from cauchy.polynum.local (localhost [127.0.0.1]) by cauchy.polynum.local (8.15.2/8.15.2) with ESMTPS id 19EIUchu006685 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for <9fans@9fans.net>; Thu, 14 Oct 2021 20:30:39 +0200 (CEST) Received: (from tlaronde@localhost) by cauchy.polynum.local (8.15.2/8.14.9/Submit) id 19EIUcDG007350 for 9fans@9fans.net; Thu, 14 Oct 2021 20:30:38 +0200 (CEST) X-Authentication-Warning: cauchy.polynum.local: tlaronde set sender to thierry.laronde@sfr.fr using -f Date: Thu, 14 Oct 2021 20:30:38 +0200 From: tlaronde@polynum.com To: 9fans <9fans@9fans.net> Subject: Re: [9fans] Re: APE:sys/time.h: long instead of suseconds_t Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: Topicbox-Policy-Reasoning: allow: sender is a member Topicbox-Message-UUID: d9c33e6a-2d1c-11ec-99a4-a037ff66c5b6 Archived-At: =?UTF-8?B?PGh0dHBzOi8vOWZhbnMudG9waWNib3guY29tL2dyb3Vwcy85?= =?UTF-8?B?ZmFucy9UMjMyYjcxNzYzNTJjMDEyYi1NODZiMTkxODRlZTdjZjE3YjAwZjU1?= =?UTF-8?B?ODA5Pg==?= List-Help: List-Id: "9fans" <9fans.9fans.net> List-Post: List-Software: Topicbox v0 List-Subscribe: Precedence: list Reply-To: 9fans <9fans@9fans.net> List-Unsubscribe: , Topicbox-Delivery-ID: 2:9fans:437d30aa-c441-11e9-8a57-d036212d11b0:522be890-2105-11eb-b15e-8d699134e1fa:M86b19184ee7cf17b00f55809:1:eJ3NWw6wZPjPq-KZMgjph1JWZ_7VGgYVDbl5nHkHKWQ Le Thu, Oct 14, 2021 at 06:11:54PM +0000, Conor Williams a =C3=A9crit : > surely you can shift a 64 bit long? >=20 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: >=20 > > 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, 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 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-M86b19= 184ee7cf17b00f55809 Delivery options: https://9fans.topicbox.com/groups/9fans/subscription