Skip to content

Commit 8a36780

Browse files
committed
useTimer minor code enhancement
1 parent 97a830d commit 8a36780

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/useTimer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export default function useTimer(settings) {
6767
useEffect(() => {
6868
if (Validate.expiryTimestamp(expiryTimestamp)) {
6969
const secondsValue = Time.getSecondsFromExpiry(expiryTimestamp);
70-
const extraMilliSeconds = ((secondsValue - Math.floor(secondsValue)) * 1000).toFixed(2);
70+
const extraMilliSeconds = Math.floor((secondsValue - Math.floor(secondsValue)) * 1000);
7171
setSeconds(secondsValue);
7272
if (extraMilliSeconds > 0) {
7373
handleExtraMilliSeconds(secondsValue, extraMilliSeconds);

0 commit comments

Comments
 (0)