boost::posix_time::ptime ConstConnection::finished_time() const { return ib_to_ptime(ib()->tv_created, (ib()->t.finished - ib()->t.started)); }
boost::posix_time::ptime ib_to_ptime(ib_timeval_t tv, ib_time_t offset) { return ib_to_ptime(tv) + seconds(offset / c_microseconds_per_second) + microseconds(offset % c_microseconds_per_second); }
boost::posix_time::ptime ConstConnection::started_time() const { return ib_to_ptime(ib()->tv_created); }
boost::posix_time::ptime ConstTransaction::response_finished_time() const { return ib_to_ptime(ib()->tv_created, (ib()->t.response_finished - ib()->t.started)); }
boost::posix_time::ptime ConstTransaction::request_body_time() const { return ib_to_ptime(ib()->tv_created, (ib()->t.request_body - ib()->t.started)); }
boost::posix_time::ptime ConstTransaction::logtime_time() const { return ib_to_ptime(ib()->tv_created, (ib()->t.logtime - ib()->t.started)); }
boost::posix_time::ptime ConstTransaction::postprocess_time() const { return ib_to_ptime(ib()->tv_created, (ib()->t.postprocess - ib()->t.started)); }