posix_time::time_duration div( const posix_time::time_duration &time, double divisor) { return posix_time::time_duration(0, 0, 0, posix_time::time_duration::fractional_seconds_type( (double)time.ticks() / divisor + 0.5)); }
posix_time::time_duration mul( const posix_time::time_duration &time, double rhs) { return posix_time::time_duration(0, 0, 0, posix_time::time_duration::fractional_seconds_type( (double)time.ticks() * rhs + 0.5)); }
double div( const posix_time::time_duration &time1, const posix_time::time_duration &time2) { return (double)time1.ticks() / (double)time2.ticks(); }