Currently, the user must refresh the page to see the timer update, which is computed by taking the current time minus the start_time field of the TimeEntry, if the TimeEntry is running. I would like to have the timer update without the need for refreshing.
I see two possible implementations:
A JavaScript function is triggered when the TimeEntry is created, and updates the timer every minute.
A JavaScript function makes an AJAX call to the server every minute for all the TimEntry data, and updates all the shown TimeEntry's durations appropriately. The benefit to this (despite it possibly DDoS'ing my server) would be that if a timer is stopped on one device, it is stopped everywhere.
Currently, the user must refresh the page to see the timer update, which is computed by taking the current time minus the
start_time
field of the TimeEntry, if the TimeEntry is running. I would like to have the timer update without the need for refreshing.I see two possible implementations:
Open to other suggestions, of course!