How do I get ping values to use in a widget?

i dont really remember where i got the 4 from but im pretty sure it gets the right number with it.
Edit: yeah, that’s because they compress ping into a byte by dividing it by 4