From: roger peppe <rogpeppe@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] a pair nec bugs
Date: Fri, 20 May 2011 11:52:37 +0100 [thread overview]
Message-ID: <BANLkTimHDMPM08GT9xhPxv9ceADsmxj_sA@mail.gmail.com> (raw)
In-Reply-To: <BANLkTimDdG3MnLejCBdJA+Cg-OjUOEK_0g@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 805 bytes --]
Or one file containing the two numbers. But perhaps they change...
On 20 May 2011 11:45, "ron minnich" <rminnich@gmail.com> wrote:
> I think the growing complexity of nsec() shows that the file model
> doesn't work in all cases ... the thing starts to look a bit overly
> complex to me. The fact that it fails due to the size of a static fd
> array is also a warning flag.
>
> I think a better interface would be one in which you read two variables:
> /dev/nsecoffset
> /dev/nsecdivisor
>
> You could then apply these to the output of cycles():
> nsec = (cycles()/divisor)-offset
>
> to get time.
>
> nsec gives you precision but dropping into a system call to read time
> tosses away any hope of accuracy you might achieve. Simply put, nsec()
> is not correctly named :-)
>
> ron
>
[-- Attachment #2: Type: text/html, Size: 1038 bytes --]
next prev parent reply other threads:[~2011-05-20 10:52 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-20 1:30 erik quanstrom
2011-05-20 5:05 ` [9fans] a pair nsec bugs erik quanstrom
2011-05-20 10:43 ` [9fans] a pair nec bugs ron minnich
2011-05-20 10:52 ` roger peppe [this message]
2011-05-20 10:57 ` ron minnich
2011-05-20 12:47 ` erik quanstrom
2011-05-20 19:03 ` ron minnich
2011-05-20 19:16 ` erik quanstrom
2011-05-21 3:27 ` erik quanstrom
2011-05-21 9:59 ` Charles Forsyth
2011-05-21 12:16 ` erik quanstrom
2011-05-21 21:50 ` erik quanstrom
2011-05-21 22:14 ` Charles Forsyth
2011-05-22 3:06 ` erik quanstrom
2011-05-22 13:30 ` Charles Forsyth
2011-06-02 19:16 ` erik quanstrom
2011-06-03 9:52 ` Charles Forsyth
2011-06-04 18:12 ` adriano
2011-06-03 13:13 erik quanstrom
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=BANLkTimHDMPM08GT9xhPxv9ceADsmxj_sA@mail.gmail.com \
--to=rogpeppe@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).