()
| 2089 | } |
| 2090 | |
| 2091 | function updateTodayStatsResetText() { |
| 2092 | if (!elements.todayStatsReset) return; |
| 2093 | const now = new Date(); |
| 2094 | const next = new Date(); |
| 2095 | next.setHours(24, 0, 0, 0); |
| 2096 | const remain = Math.max(0, next.getTime() - now.getTime()); |
| 2097 | const hours = Math.floor(remain / 3600000); |
| 2098 | const minutes = Math.floor((remain % 3600000) / 60000); |
| 2099 | elements.todayStatsReset.textContent = `重置剩余 ${String(hours).padStart(2, '0')}:${String(minutes).padStart(2, '0')}`; |
| 2100 | } |
| 2101 | |
| 2102 | function startTodayStatsResetTicker() { |
| 2103 | updateTodayStatsResetText(); |
no outgoing calls
no test coverage detected