How to measure latency in a wifi network java android -


i developing mobile app, need parameters implement algorithm, , not know how measure latency in wifi network. people says using ping, not know how implement this.

this first question, learning. thank you.

please have @ this answer might after

you might want try following code sample measure time

string host = "172.16.0.2"; int timeout = 3000; long beforetime = system.currenttimemillis(); reachable =  inetaddress.getbyname(host).isreachable(timeout); long aftertime = system.currenttimemillis(); long timedifference = aftertime - beforetime; 

Comments

Popular posts from this blog

C# random value from dictionary and tuple -

cgi - How do I interpret URLs without extension as files rather than missing directories in nginx? -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -