示例#1
0
 /** Get the duration in the specified unit.
     @code
         // Get this duration as days
         double days = duration.getDurationIn(Day);
         // Get this duration as minutes
         double minutes = duration.getDurationIn(Minute);
         // Get this duration as a multiple of the given duration
         double durationAs = duration.getDurationIn(duration); // Should be 1.0, of course
     @endcode */
 inline double getDurationIn(const Duration & other) const { return preciseDuration() / other.preciseDuration(); }