MCPcopy Create free account
hub / github.com/VirtualHotBar/NetMount / startUpdateCont

Function startUpdateCont

src/controller/stats/continue.ts:3–15  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1import { reupStats } from './stats'
2
3function startUpdateCont() {
4 const intervalId = setInterval(async () => {
5 try {
6 await reupStats()
7 } catch (error) {
8 // 处理错误,例如记录日志或清理状态
9 console.error('Error occurred while updating stats:', error)
10 }
11 }, 700) // 每n毫秒调用一次
12
13 // 返回清除定时器的函数,方便在需要停止更新时调用
14 return () => clearInterval(intervalId)
15}
16
17export { startUpdateCont }

Callers 1

initFunction · 0.90

Calls 1

reupStatsFunction · 0.90

Tested by

no test coverage detected