Comparison function which orders calls by their deadlines.
| 129 | private: |
| 130 | // Comparison function which orders calls by their deadlines. |
| 131 | static bool DeadlineLess(const InboundCall* a, |
| 132 | const InboundCall* b) { |
| 133 | auto time_a = a->GetClientDeadline(); |
| 134 | auto time_b = b->GetClientDeadline(); |
| 135 | if (time_a == time_b) { |
| 136 | // If two calls have the same deadline (most likely because neither one specified |
| 137 | // one) then we should order them by arrival order. |
| 138 | time_a = a->GetTimeReceived(); |
| 139 | time_b = b->GetTimeReceived(); |
| 140 | } |
| 141 | return time_a < time_b; |
| 142 | } |
| 143 | |
| 144 | // Struct functor wrapper for DeadlineLess. |
| 145 | struct DeadlineLessStruct { |
nothing calls this directly
no test coverage detected