In message <[email protected]>, Mark Calabretta writes:
>I offered the solution of providing a function to subtract two tm
>structs. It would be included with the realtime_t suite of routines
>even though it doesn't deal with realtime_t values. This is how the
>man page might start:
>
> int tmdiff(const struct tm *tm1, const struct tm *tm2, double *diff);
>
> Return the time interval, *tm2 - *tm1, in SI seconds.
ENOCANDO
At best you can return it as a "struct tm" recording the expected
difference.
For instance:
{2100-01-01 00:00:00Z} - {2012-01-01 00:00:00Z} = {88y}
... but we don't know how many seconds.
Ohh, and btw: That function is a hell to write and it will never
qualify as efficient...
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
[email protected] | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
_______________________________________________
LEAPSECS mailing list
[email protected]
http://six.pairlist.net/mailman/listinfo/leapsecs