MCPcopy Create free account
hub / github.com/NetSys/bess / NextFlowArrival

Method NextFlowArrival

core/modules/flowgen.cc:98–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96}
97
98inline uint64_t FlowGen::NextFlowArrival() {
99 switch (arrival_) {
100 case Arrival::kUniform:
101 return flow_gap_ns_;
102 case Arrival::kExponential:
103 return -log(rng_.GetRealNonzero()) * flow_gap_ns_;
104 default:
105 CHECK(0);
106 }
107 return 0;
108}
109
110// should never fail, always returning a non-null pointer
111inline flow *FlowGen::ScheduleFlow(uint64_t time_ns) {

Callers

nothing calls this directly

Calls 1

GetRealNonzeroMethod · 0.80

Tested by

no test coverage detected