summaryrefslogtreecommitdiff
path: root/ns3-simulator/modules/callbacks.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ns3-simulator/modules/callbacks.cc')
-rw-r--r--ns3-simulator/modules/callbacks.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/ns3-simulator/modules/callbacks.cc b/ns3-simulator/modules/callbacks.cc
index a552eb9..8016fbc 100644
--- a/ns3-simulator/modules/callbacks.cc
+++ b/ns3-simulator/modules/callbacks.cc
@@ -6,5 +6,5 @@ void PktReceived(std::string nodeName,Ptr< const Packet > packet, const Address
}
void EnergyUpdated(std::string nodeName,double oldValue, double newValue){
- NS_LOG_UNCOND("Node " << nodeName << " consumes " << newValue << "J");
+ NS_LOG_UNCOND("Node " << nodeName << " consumes " << newValue-oldValue << "J");
}