Skip to content

Commit 1219a7d

Browse files
committed
Inline Event operator> & get_time
1 parent 023f52c commit 1219a7d

3 files changed

Lines changed: 6 additions & 19 deletions

File tree

source/metrics/packet_reordering/simple_packet_reordering.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
namespace sim {
77
class SimplePacketReordering : public IPacketReordering {
88
public:
9-
explicit SimplePacketReordering(std::size_t a_max_packets = 1'000'000);
9+
explicit SimplePacketReordering(std::size_t a_max_packets = 512);
1010
~SimplePacketReordering() = default;
1111

1212
void add_record(PacketNum packet_num) final;

source/scheduler/event/event.cpp

Lines changed: 0 additions & 15 deletions
This file was deleted.

source/scheduler/event/event.hpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@ namespace sim {
77
// Base class for event
88
class Event {
99
public:
10-
Event(TimeNs a_time);
10+
explicit inline Event(TimeNs a_time) : m_time(a_time) {}
1111
virtual ~Event() = default;
1212
virtual void operator()() = 0;
1313

14-
TimeNs get_time() const;
15-
bool operator>(const Event &other) const;
14+
inline TimeNs get_time() const { return m_time; }
15+
inline bool operator>(const Event &other) const {
16+
return m_time > other.m_time;
17+
}
1618

1719
protected:
1820
const TimeNs m_time;

0 commit comments

Comments
 (0)