Server-side time refresh younger brother is engaged in mobile games & nbsp; would you like to ask & nbsp; front-end request time on my server & nbsp; I should pass it to him the real-time & nbsp; so I should always refresh myself & nbsp; so how to refresh in real time & nbsp; any solutions require as few resources as possible.
I want to know if my younger brother is a mobile game developer.
Front-end request time on my server
I should pass it to him in real time on my server
So how can I refresh myself in real time?
Are there any solutions?
Use as few resources as possible
Mobile game server frontend
Share:
------ Solution --------------------
Your "visualization" is also a solution, but it is not that you refresh the time (time exists objectively) but that you express it in your way.
Generally, this is not the case. Instead, the server time is sent to the user at the beginning, which is used to calculate the time difference between the user time and the server time. There is a lot of code for this js countdown. you can find it.
------ Solution --------------------
That's right.
In addition, you can determine whether it is within the time range when you really "receive the prize ".
What time () is obtained on the server always the current server time? @ Xuzuning
------ Solution --------------------
Reference:
That's right.
In addition, you can determine whether it is within the time range when you really "receive the prize ".
What time () is obtained on the server always the current server time? @ Xuzuning
Time () obtains the server time. You can do this: Pass the server time at the beginning, and take the server time as the standard during verification. it doesn't matter how Rice is stored on the client side, after all, the key factor for determining success is in the hands of the server.