-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Also adding timeout margin to fixed session warning
- Loading branch information
1 parent
cba4874
commit 6761c00
Showing
6 changed files
with
40 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/** | ||
* timestampFormatter | ||
* convert time-remaining to mm:ss. Given the remaining time can easily be | ||
* represented as elapsed-time since the JSDate epoch, convert to a | ||
* Date object, format it, and extract the minutes and seconds. | ||
* That is, given we have 99 seconds left, that converts to a Date | ||
* like `1970-01-01T00:01:39.000Z`; extract the `01:39`. | ||
*/ | ||
// eslint-disable-next-line import/prefer-default-export | ||
export const timestampFormatter = (remainingMillis) => { | ||
if (remainingMillis >= 1000) { | ||
return new Date(remainingMillis).toISOString().substring(14, 19); | ||
} | ||
|
||
return '00:00'; | ||
}; |