9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Conor Williams <conor.williams@gmail.com>
To: 9fans <9fans@9fans.net>
Subject: Re: [9fans] Re: APE:sys/time.h: long instead of suseconds_t
Date: Thu, 14 Oct 2021 18:11:54 +0000	[thread overview]
Message-ID: <CAL6pNZ9AkGZkg4N+cLix3ELS543qAtsdb0ecXru9NRHaQpqO7A@mail.gmail.com> (raw)
In-Reply-To: <YWhwxhIb/uPf5+Dr@polynum.com>

[-- Attachment #1: Type: text/plain, Size: 1363 bytes --]

surely you can shift a 64 bit long?

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 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 <tlaronde +AT+ polynum +dot+ com>
>              http://www.kergis.com/
>             http://kertex.kergis.com/
>                http://www.sbfa.fr/
> Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T232b7176352c012b-Mf1f6b24803e829b411b0691d
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 3218 bytes --]

  reply	other threads:[~2021-10-14 18:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-14 17:56 [9fans] " tlaronde
2021-10-14 18:02 ` [9fans] " tlaronde
2021-10-14 18:11   ` Conor Williams [this message]
2021-10-14 18:30     ` tlaronde
2021-10-14 18:48       ` Conor Williams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAL6pNZ9AkGZkg4N+cLix3ELS543qAtsdb0ecXru9NRHaQpqO7A@mail.gmail.com \
    --to=conor.williams@gmail.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).