Measure message rate

I am making a network application and I would like to display time messages sent from sender to recipient.

What methods, in your opinion, are suitable for implementing this function?

What I thought was storing the current time in the message and comparing it with the time at the end of the receiver. Although the java document says that the current set time may vary depending on the OS.

How do I get the current time so that it is the same for each OS? (or just OSX and win)

ps: In most cases, the application simply sends messages and does not expect anything back.

+5
source share
5 answers

- NTP (Network Time Protocol) . NTP- , .

+2

, , , .

, , . 100% , .

+3

, , , . - , .

0

. , , , "-".

; .. . , - .

0

TDOA (Time-Difference of Arrival) - , , . - RTT.

4 :

x1 = sender send time
y1 = receiver receive time
y2 = receiver send time
x2 - sender receive time

RTT, (y):

x2 - (y2 - y1) - x1

java System.nanoTime();

0

All Articles