Hi Why my request to telegram took so many time... My

ping to telegram is 9 ms but the request like sendMessage minimun take more than 200 to 600 ms

Can any body help?

19 ответов

16 просмотров

ping != actual processing time

ADLVI- Автор вопроса
Casa
ping != actual processing time

I test any part of my code The slowest part is the send request to telegram..

ADLVI- Автор вопроса
ADLVI
screenshot Like this?

0.1 microseconds??? What is the location of your server?

ADLVI- Автор вопроса
User.h
0.1 microseconds??? What is the location of your s...

No bro Its seconds Microseconds return unixtime and the float part is micro time

ADLVI
No bro Its seconds Microseconds return unixtime an...

🤦🏻‍♂️Ooops U are right thanks

User.h
Have u access to terminal on your server?

if($text=="ping"){ $start_time = round(microtime(true) * 1000); $send= bot('sendmessage', [ 'chat_id' => $chat_id, 'text' =>"Ping:", ])->result->message_id; $end_time = round(microtime(true) * 1000); $time_taken = $end_time - $start_time; bot('editMessagetext',[ "chat_id" => $chat_id, "message_id" => $send, "text" => "Ping:" . $time_taken . "ms", ]);}

Похожие вопросы

Карта сайта