I use Omnet++-4.6 and Veins-4a2.
The method simTime() returns the current time in seconds. I need to transform it to milliseconds, but I could not.
When I declare a simtime_t variable like this:
simtime_t TimeVar = simTime() * 1000;
it gives an error. Do you have an idea on how can I do this?
simtime_t is a class for storing the simulation time in seconds with different levels of precision as explained in the manual https://omnetpp.org/doc/omnetpp/manual/#sec:simple-modules:simulation-time
If you need milliseconds, do the following:
double ms = simTime().dbl() * 1000;
But take into account that if you want to use this value for scheduling other message, you have to convert this time again to seconds to be coherent with the simulation time:
scheduleAt(ms / 1e3, msg);