Get a particular milestone hrtime'r. Note that this can return 0, which means it has not been set yet.
| 5435 | // Get a particular milestone hrtime'r. Note that this can return 0, which means it has not |
| 5436 | // been set yet. |
| 5437 | TSReturnCode |
| 5438 | TSHttpTxnMilestoneGet(TSHttpTxn txnp, TSMilestonesType milestone, ink_hrtime *time) |
| 5439 | { |
| 5440 | sdk_assert(sdk_sanity_check_txn(txnp) == TS_SUCCESS); |
| 5441 | sdk_assert(sdk_sanity_check_null_ptr(time) == TS_SUCCESS); |
| 5442 | HttpSM *sm = reinterpret_cast<HttpSM *>(txnp); |
| 5443 | TSReturnCode ret = TS_SUCCESS; |
| 5444 | |
| 5445 | if ((milestone < TS_MILESTONE_UA_BEGIN) || (milestone >= TS_MILESTONE_LAST_ENTRY)) { |
| 5446 | *time = -1; |
| 5447 | ret = TS_ERROR; |
| 5448 | } else { |
| 5449 | *time = sm->milestones[milestone]; |
| 5450 | } |
| 5451 | |
| 5452 | return ret; |
| 5453 | } |
| 5454 | |
| 5455 | TSReturnCode |
| 5456 | TSHttpTxnCachedRespTimeGet(TSHttpTxn txnp, time_t *resp_time) |
no test coverage detected