how to make java sockets use virtual clock instead of real-time clock

How does the java sockets obtain clock information from the real-time clock. The reason I want to know is, I  have  subclasses of, and and I want my sockets to be used by applications that run on a network emulator. The thing is that when I use routines that needs timing information like setSOTimeout, getSOTimeout, I want them to use the virtual clock that my simulator uses instead of the real time physical clock. I hope the question is clear. Thank you for your assistance
Who is Participating?
objectsConnect With a Mentor Commented:
Override get/setSOTimeout() and scale the value according to your virtual clock.
The timeouts are given by an offset from now (the time the method executes). You could map that duration to one of your own
debriscaAuthor Commented:
Well guys, thanks very much, I managed to get it to work by overriding the methods to use the Virtual Clock. I tried to split the points but it ddnt work out for some reason so I gave <b>objects</b> the points.
OK ;-)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.