跳到主要内容

github/tai

公开

Tai · Windows 软件与网站使用时长统计。上游 Planshit/Tai 的源码镜像,非灵栈原创;MIT 许可。来源:https://github.com/Planshit/Tai 。本次为手动同步,暂不提供安装包。

提交记录
修改Core/Servicers/Instances/Main.cs+8 −4看文件
@@ -173,7 +173,7 @@ namespace Core.Servicers.Instances
173173 config = appConfig.GetConfig();
174174 UpdateConfigIgnoreProcess();
175175
176删除:
176新增:
177177
178178 // 启动睡眠监测
179179 sleepdiscover.Start();
@@ -431,9 +431,15 @@ namespace Core.Servicers.Instances
431431
432432 // 更新计时
433433 TimeSpan timeSpan = DateTime.Now - time;
434删除:
435434 int seconds = (int)timeSpan.TotalSeconds;
436435
436新增: if (seconds > 3600)
437新增: {
438新增: Logger.Warn($"计时异常。start:{time},process:{app},duration:{seconds},status:{sleepStatus}");
439新增: activeStartTime = DateTime.Now;
440新增: return;
441新增: }
442新增:
437443 // 如果是休眠状态要减去5分钟
438444 if (sleepStatus == SleepStatus.Sleep)
439445 {
@@ -446,8 +452,6 @@ namespace Core.Servicers.Instances
446452
447453 // 关联进程更新
448454 HandleLinks(app, seconds, time);
449删除:
450删除: //Logger.Info("status:" + sleepStatus + ",process:" + app + ",seconds:" + seconds + ",start:" + activeStartTime.ToString() + ",end:" + DateTime.Now.ToString() + ",time:" + time.ToString());
451455 }
452456
453457 activeStartTime = DateTime.Now;