The
ns3::Time::SetResolution(Time::MS);
command only works with NS (NanoSeconds). On running with degugger, I get the following output:
Program received signal SIGFPE, Arithmetic exception.
0x00007ffff6bbf53f in ns3::operator/ (lhs=..., rhs=...) at ./ns3/nstime.h:879
879 int64_t res = lhs.m_data / rhs.m_data;
I looked into the file (line 879 of nstime.h) pointed by it, but couldn't locate the error. I am attaching the program to reproduce the error.
When setting the resolution to NanoSeconds using
ns3::Time::SetResolution(Time::NS);
the error goes away.