9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] my /dev/time for Linux
@ 2009-03-01  4:57 Chris Brannon
  2009-03-02 19:02 ` J.R. Mauro
  2009-03-06 10:29 ` maht
  0 siblings, 2 replies; 6+ messages in thread
From: Chris Brannon @ 2009-03-01  4:57 UTC (permalink / raw)
  To: 9fans

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



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-03-12 18:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-01  4:57 [9fans] my /dev/time for Linux Chris Brannon
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

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).