Andrew wants to be able to do: DCHECK_EQ(expected_time_delta, time_delta); This can't be done without operator<< support.
On Thu, Aug 20, 2009 at 6:46 PM, Jim Roskind <[email protected]> wrote: > +1 for Peter's suggestion. > TimeDelta has an internal accuracy of microseconds. What > resolution/scaling do you want to print in a check? Sometimes it is > minutes, sometimes seconds, sometimes milliseconds, I doubt that we want > microseconds :-/. > > Explicit conversion as suggested doesn't seem that painful IMO. > > Jim > > > On Thu, Aug 20, 2009 at 4:02 PM, Peter Kasting <[email protected]>wrote: > >> On Thu, Aug 20, 2009 at 3:33 PM, Andrew Scherkus >> <[email protected]>wrote: >> >>> Any opposition to globally declaring an operator<< ostream overload for >>> TimeDelta in base/time.h? >>> >> >> This will pull the stream headers into all files that use time.h. Is that >> going to bloat any code or cost compile time? >> >> Is there another easy solution like doing DCHECK() << "TimeDelta was: " << >> myTimeDelta.asInt64OrWhatever()? >> >> PK >> >> >> > > > > --~--~---------~--~----~------------~-------~--~----~ Chromium Developers mailing list: [email protected] View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~----------~----~----~----~------~----~------~--~---
