Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework playback architecture to use dispatcher #50

Merged
merged 16 commits into from
Mar 8, 2024
Prev Previous commit
Next Next commit
bless me
rtshkmr committed Mar 7, 2024
commit 59cb3b1f34fee0be59c953054ac5c73807bfeb7e
13 changes: 13 additions & 0 deletions assets/js/utils/time_utils.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* Contains helpers relevant to time.
* */

/**
* Given seconds, returns a string representing it as
* hh:mm:ss e.g. 00:12:05
* */
export const formatDisplayTime = (seconds) => {
return new Date(1000 * seconds).toISOString().substring(11, 19)
}

export const nowSeconds = () => Math.round(Date.now() / 1000)