core: Use real time in RealtimeSimulatorImpl::Now

This commit is contained in:
Alberto Gallegos Ramonet
2025-03-31 19:25:44 +09:00
parent 9239285a34
commit 558943e7eb
3 changed files with 5 additions and 1 deletions

View File

@@ -28,6 +28,8 @@ This file is a best-effort approach to solving this issue; we will do our best b
### Changed behavior
* (core) `RealTimeSimulatorImpl::Now` uses real time instead of the time of the last event call.
## Changes from ns-3.43 to ns-3.44
### New API

View File

@@ -30,6 +30,8 @@ been tested on Linux. As of this release, the latest known version to work with
### New user-visible features
- (core ) !2385 - The function `Now()` will now print the real time since the beginning of the simulation instead of the real time since the last event call when `RealTimeSimulatorImpl` is used.
### Bugs fixed
- (wifi) #2368 - Fix various issues related to Content Channels and RU allocation. Fixes mostly covers cases where OFDMA is used with central 26 tones, where a single user is being assigned the whole PPDU bandwidth or where a RU is larger than 20 MHz.

View File

@@ -573,7 +573,7 @@ RealtimeSimulatorImpl::ScheduleNow(EventImpl* impl)
Time
RealtimeSimulatorImpl::Now() const
{
return TimeStep(m_currentTs);
return TimeStep(m_running ? m_synchronizer->GetCurrentRealtime() : m_currentTs);
}
//