Click here to Skip to main content
15,903,030 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi i want to build a Countdown timer from the response i am getting from WebSocket api

From the wss response i am getting synchronous time in epoch format
"start_time":
1562254114

"end_time" : "
1562254414


Not having any issue with epoch, i just want to create a Countdown timer based on this "start_time" and "end_time" using jQuery.

Will you please help how to start?
Earlier response recreated...

What I have tried:

After contacting epoch to human time the difference between start_time and end_time is 5 minutes, in seconds it's 300

so the equation should be 300/100,the result to update each second will come 3 seconds so each second end_time minus 3 seconds

But how to implement
Posted
Updated 4-Jul-19 6:16am

1 solution

I think it should be end_time minus current time, but how to implement
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900