OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "net/quic/core/congestion_control/simulation/actor.h" |
| 6 #include "net/quic/core/congestion_control/simulation/simulator.h" |
| 7 |
| 8 namespace net { |
| 9 namespace simulation { |
| 10 |
| 11 Actor::Actor(Simulator* simulator, std::string name) |
| 12 : simulator_(simulator), |
| 13 clock_(simulator->GetClock()), |
| 14 name_(std::move(name)) { |
| 15 simulator->AddActor(this); |
| 16 } |
| 17 |
| 18 Actor::~Actor() {} |
| 19 |
| 20 void Actor::Schedule(QuicTime next_tick) { |
| 21 simulator_->Schedule(this, next_tick); |
| 22 } |
| 23 |
| 24 void Actor::Unschedule() { |
| 25 simulator_->Unschedule(this); |
| 26 } |
| 27 |
| 28 } // namespace simulation |
| 29 } // namespace net |
OLD | NEW |