Hello fellow programmers i'm trying to create a multi-user timer with flask and socketio, a div starts with a value of 15, every second it has to be updated to 14, then 13, so on so forth. I've made the javascript functions to do that for a single user, the thing is that when a new client connects to the server, said client has like a new "perception" of when a second is passed, the div is going to update for each perception of each client and finally it will not be 15 seconds pass but a little less because the asynchronous communication and the different perceptions of "one second" between the clients make the div update faster than expected.
I'm thinking about handling the time from the server side with python but i don't know how to do that.
Any advice will be recieved gratefully.
Aucun commentaire:
Enregistrer un commentaire