Replace curTick global variable with accessor functions.
This step makes it easy to replace the accessor functions (which still access a global variable) with ones that access per-thread curTick values.
This commit is contained in:
@@ -94,8 +94,8 @@ void
|
||||
EtherDump::dumpPacket(EthPacketPtr &packet)
|
||||
{
|
||||
pcap_pkthdr pkthdr;
|
||||
pkthdr.seconds = curTick / SimClock::Int::s;
|
||||
pkthdr.microseconds = (curTick / SimClock::Int::us) % ULL(1000000);
|
||||
pkthdr.seconds = curTick() / SimClock::Int::s;
|
||||
pkthdr.microseconds = (curTick() / SimClock::Int::us) % ULL(1000000);
|
||||
pkthdr.caplen = std::min(packet->length, maxlen);
|
||||
pkthdr.len = packet->length;
|
||||
stream->write(reinterpret_cast<char *>(&pkthdr), sizeof(pkthdr));
|
||||
|
||||
Reference in New Issue
Block a user