Does OPNET provide functionality to measure the actual elapsed real-world time (not the elapsed simulation time)?

Categories:
Solution Number:
S20612
Last Modified:
2013-08-20
Issue

Does OPNET provide functionality to measure the actual elapsed real-world time (not the elapsed simulation time)?

Solution

This is not possible using OPNET-provided KPs. However, you can use the C standard library functions to achieve the functionality you desire. For example, you can get the start of simulation time in the init state of a process model using time (), (you can define a global variable to store this value, so that other processes can extern it and get its value, if need be.) Next, whenever you want to find out the time elapsed, you can again call time () and subtract initial time from the current time. You can look for the time () library function in any standard C book. Make sure to include time.h in the model where you call this function.

Environment

DES Kernel->Other

Attachments
NOTICE: Riverbed® product names have changed. Please refer to the Product List for a complete list of product names.
Can't find an answer? Create a case