From: Chris Brannon <cmbrannon@cox.net>
To: 9fans@9fans.net
Subject: [9fans] my /dev/time for Linux
Date: Sat, 28 Feb 2009 22:57:54 -0600 [thread overview]
Message-ID: <20090301045847.GUUC18213.eastrmmtao106.cox.net@eastrmimpo03.cox.net> (raw)
I wrote a module that emulates Plan 9's /dev/time under Linux.
Reading /dev/time yields 4 decimal numbers: seconds since start of epoch,
nanoseconds since start of epoch, jiffies since boot, and jiffies per second.
As with Plan 9, one can set the clock by writing a decimal number to the
device. The value represents the number of seconds
since the start of the epoch.
The interesting aspect is that users other than root can set the clock
if they have write access to /dev/time.
The code is here: http://members.cox.net/cmbrannon/devtime.tgz
It may have issues. Read it before using. Comments are welcome.
-- Chris
next reply other threads:[~2009-03-01 4:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-01 4:57 Chris Brannon [this message]
2009-03-02 19:02 ` J.R. Mauro
2009-03-03 14:42 ` Chris Brannon
2009-03-03 16:21 ` J.R. Mauro
2009-03-06 10:29 ` maht
2009-03-12 18:24 ` J.R. Mauro
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=20090301045847.GUUC18213.eastrmmtao106.cox.net@eastrmimpo03.cox.net \
--to=cmbrannon@cox.net \
--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).