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

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

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