forked from mirror/misskey
refactor: avoid temporary previous tapping declarations
This commit is contained in:
parent
ce8967e8d9
commit
e649b1b1e6
@ -149,13 +149,7 @@ let sOneRound = false;
|
|||||||
function tick() {
|
function tick() {
|
||||||
const now = props.now();
|
const now = props.now();
|
||||||
now.setMinutes(now.getMinutes() + now.getTimezoneOffset() + props.offset);
|
now.setMinutes(now.getMinutes() + now.getTimezoneOffset() + props.offset);
|
||||||
const previousS = s;
|
if (s === (s = now.getSeconds()) && m === (m = now.getMinutes()) && h === (h = now.getHours())) {
|
||||||
const previousM = m;
|
|
||||||
const previousH = h;
|
|
||||||
s = now.getSeconds();
|
|
||||||
m = now.getMinutes();
|
|
||||||
h = now.getHours();
|
|
||||||
if (previousS === s && previousM === m && previousH === h) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
hAngle = Math.PI * (h % (props.twentyfour ? 24 : 12) + (m + s / 60) / 60) / (props.twentyfour ? 12 : 6);
|
hAngle = Math.PI * (h % (props.twentyfour ? 24 : 12) + (m + s / 60) / 60) / (props.twentyfour ? 12 : 6);
|
||||||
|
Loading…
Reference in New Issue
Block a user