Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Aug 1998 20:30:15 -0500 (CDT)
From:      Jim Bryant <jbryant@unix.tfs.net>
To:        joelh@gnu.org
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: proposal to not change time_t
Message-ID:  <199808200130.UAA29610@unix.tfs.net>
In-Reply-To: <199808192249.RAA14808@detlev.UUCP> from Joel Ray Holveck at "Aug 19, 98 05:49:42 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
In reply:
> > I do think it's useful to have time resolution be better than 1
> > second.
> 
> I still haven't heard why this is a useful filesystem addition.
> (Please no flame wars!)

without a generational filesystem, it does seem pretty useless.  it
might be a good idea on VMS tho.  one could argue that for legal
reasons it could be useful, but with touch, and without a standard
unchangable timebase that is common among ALL computers, that argument
is unsound.

i also pose the question.  why have a nanosecond count in the inode?

the only apps i can think of would be a temp development hack to
journal filesystem optimization changes, or military systems.

any military system requiring such resolution would probably be for
weapons or battlefield use, and thus bsd would not be considered for a
waiver from the AJPO, as all such apps, even with the easing of the
ADA restriction, still require an ADA program running under an OS
written in ADA.

i personally think that this is a lazy approach to the time-tested
technique of using sequence numbers in a filename for files created at
the same time_t.

/* tried and true since before time began.
 * if you use a UTC date, then you are also ISO compliant.
 * this would also fall into a natural sort order.
*/

if (thisrec.date = lastrec.date)
{
  thisrec.sequence = ++sequence;
}

else sequence = thisrec.sequence = 0;

strftime(filename[strlen(filename)], FILENAME_MAX, ".%Y%m%d%H%M%S", ...);
sprintf(filename[strlen(filename)], ".%d", thisrec.sequence);

/* is this so hard? */

jim
-- 
All opinions expressed are mine, if you    |  "I will not be pushed, stamped,
think otherwise, then go jump into turbid  |  briefed, debriefed, indexed, or
radioactive waters and yell WAHOO !!!      |  numbered!" - #1, "The Prisoner"
------------------------------------------------------------------------------
Inet: jbryant@tfs.net    AX.25: kc5vdj@wv0t.#neks.ks.usa.noam     grid: EM28pw
voice: KC5VDJ - 6 & 2 Meters AM/FM/SSB, 70cm FM.   http://www.tfs.net/~jbryant
------------------------------------------------------------------------------
HF/6M/2M: IC-706-MkII, 2M: HTX-212, 2M: HTX-202, 70cm: HTX-404, Packet: KPC-3+

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199808200130.UAA29610>