Re: Synchronizing on File Formating

Philip Newton <[email protected]>
Newsgroups gmane.comp.security.passwordsafe.devel
Message-ID <[email protected]>
On 7/28/05, Frank Pilhofer <[email protected]> wrote:
> On Wed, 27 Jul 2005 13:00:31 -0400, Wolfgang Keller <[email protected]> wrote:
> >
> > As I understood "time_t" type, it is a long integer showing
> > milliseconds, not seconds. I'ld be happy with a "second" granularity in
> > pws files (it makes the format 1000-year prove!) but the format
> > definition should be made consistent.
> 
> As a side note, ISO C does not define the format of time_t, so an
> implementation that used millisecond values would be ISO C compliant,
> just not POSIX compliant.

By gum, you're right. I thought C said that it need not be a 32-bit
unsigned integer (it could be a double, for example), but all it seems
to say is that it has to be an arithmetic type (one that you can add
and subtract with) but that the encoding is unspecified (except that
(time_t)-1 has a special meaning). If you need an elapsed time in
seconds, you have to use difftime().

So it could well be a Java long representing a number of milliseconds
since a given epoch.
-- 
Philip Newton <[email protected]>


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September
19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.