From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Brannon To: 9fans@9fans.net Date: Sat, 28 Feb 2009 22:57:54 -0600 Message-Id: <20090301045847.GUUC18213.eastrmmtao106.cox.net@eastrmimpo03.cox.net> Subject: [9fans] my /dev/time for Linux Topicbox-Message-UUID: aa59fec0-ead4-11e9-9d60-3106f5b1d025 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