'How consistent is PHP hrtime()?
I'm currently using hrtime() in one of my project, a chat system (still in development stage).
On each message sent, I store the hrtime(true) value along with the message into database.
So recipient will request for new messages based on last message hrtime stored in app localStorage.
like for example: select*from messages_table where message_hrtime>$last_hrtime and message_to=$me
It has been working alright until today, thrn I noticed new messages
hrtime(true) value inserted into DB decreased which make new messages not to be received.
Notice the column message_hrtime decreased on id 35
And according to this article https://thephp.cc/articles/high-resolution-monotonic-timer, that hrtime() is ever increasing.
Now confused if the hrtime(true) is consistent.
PHP 7.3
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

