On Wed, 03 Sep 2003 15:07:59 -0400, David Abrahams wrote
> "Jeff Garland" <[EMAIL PROTECTED]> writes:
> 
> > On Tue, 02 Sep 2003 19:00:42 -0400, David Abrahams wrote
> >> The "fractional seconds" concept is undocumented.  My guess it's
> >> something like:
> >> 
> >>       x.fractional_seconds() == x.ticks() % seconds(1).ticks()
> >> 
> 
> Uh-huh.  So is my formula above correct or not?

Sorry, yes I believe so.

> > To really use fractional_seconds you call the resolution traits by
> > calling:
> >
> > time_duration::rep_type::res_adjust()
> 
> Where is *that* documented?

It isn't, that's the problem.
 
> ...code deleted...
> I'm sorry, that's really nasty.  Why wouldn't I just do
> 
>     seconds(1).ticks()
> 
> ??

Never thought of it, nice trick :-)


> OK, well I do.  I'm porting some Java code which uses times in whole
> milliseconds, and when a time gets written to disk I need to write 
> the number of milliseconds to maintain a compatible format.

Ok.  And I assume that you want to use it as a duration within 
the program?  Makes sense.
 
> > But now that I think about it would seems like it might
> > be possible to provide the inverse interface...
> 
> Yeah, easy even.

Care to share what you are thinking?

> >> BTW, why plural hours, minutes, seconds, but singular millisec,
> >> microsec, nanosec?
> >
> > Yikes! They probably all should be plural.  Problem is the abbreviated
> > 'millisecs' doesn't sound right to me, so perhaps that's the reason.... 
> 
> Well, abbrevs just don't sound right.  Bite the bullet and use the
> full names, please!

I've added full length names to CVS (milliseconds, nanoseconds, microseconds).
   I'll deprecate the old names over a release or so.

Jeff


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to