Searching info of how to measure the time of a ping for a ping test

Hello to the people of the Forum.

I want to make an app for measure the time value in ms of a ping with the phone in a continuously.
Like a ping test.
But i didn't find any information about how to do it.

I have seen an terminal extension who do the ping, (From Juan Antonio) but i want to measure CONTINUOUSLY the values in ms of interval of the pings, not a single one ping.

I search in the forum, and in google as Ping testing, ping measuring with AI2, and nothing.

BUT, in my google search i did find a tutorial of how to do it with another IDE from the phone, (with sketchware) not app inventor... I do not know if is of any value to share the link because is not from AI2, but the app works with blocks coding, but not equal, like Thunkable, Kodular or Niotron. (The blocks are totally different in some cases but also have similar blocks like AI2 and others).

i want to make it with AI2 and maybe if i do it well, share my work of how to do it with the community. Maybe i do not go too far, but someone catch the idea and do it better.

It's obvious i need to have in the app a clock sensor, some labels for show the info of the ping, but i do not know how to GET the measurement. The time interval between pings. And obviously i do not know if i can get the ping using the extension (TERMINAL).

For the record, this is the link to the video of youtube of the app coded with the other IDE. I do not know if any use, but here i share it. (if this not correspond, i will remove the example, i do not have any problem deleting the example of the video).
SKETCHWARE: How to make Ping Tester #1 - YouTube