Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Question Function to get latency?

Joined
Jul 18, 2015
Messages
6
Hey, I see server latency is listed in the misc section of developer telemetry panel. Can't seem to find any such function in the runemate jar. Can anyone point me in the right direction? (Or alternatively, what's a convenient tool/plugin for searching jars for functions containing key phrases?)

Thanks!
 
Joined
Jul 18, 2015
Messages
6
Hmm, guess I should have phrased more clearly - I'm looking for network latency not framerate latency. The misc section of developer panel shows both network latency and framerate(Ping: 315ms, FPS:50). Ended up just spidering the whole javadocs and grepping for anything containing "ping"|"latency", case insensitive. Nothing came up.
 
Engineer
Joined
Jul 28, 2013
Messages
2,776
The reason that it's not currently in the API is because as far as I'm aware the rs client itself doesn't store it's ping. The ping that's displayed in the misc tab is calculated by us by measuring the amount of time it takes to connect to the world you're on. I could make an api method that would return a Future<Integer> for it that would calculate it (since we know the base server and such), but the problem is it would have to be recalculated a lot. You could cache it but ping changes a lot over a running session.
 
Joined
Apr 18, 2015
Messages
408
The reason that it's not currently in the API is because as far as I'm aware the rs client itself doesn't store it's ping. The ping that's displayed in the misc tab is calculated by us by measuring the amount of time it takes to connect to the world you're on. I could make an api method that would return a Future<Integer> for it that would calculate it (since we know the base server and such), but the problem is it would have to be recalculated a lot. You could cache it but ping changes a lot over a running session.
Partially related to this; is it somehow possible to detect the state of the client? For example delay while it's loading etc; the not-very-powerful other botclient has this at Game#clientState()
 
Engineer
Joined
Jul 28, 2013
Messages
2,776
Partially related to this; is it somehow possible to detect the state of the client? For example delay while it's loading etc; the not-very-powerful other botclient has this at Game#clientState()
That feature is very rarely useful for more than simply checking if logged in and is a HUGE pain in the ass to make give consistent values because they change the expected values for each state in each gamepack and it requires mapping them back to more usable states.
 
Top