跳到主要内容

github/tai

公开

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

提交记录
修改Core/Servicers/Instances/Sleepdiscover.cs+11 −1看文件
@@ -96,6 +96,16 @@ namespace Core.Servicers.Instances
9696 {
9797 if (status == SleepStatus.Sleep)
9898 {
99新增: TimeSpan timeSpan = DateTime.Now - pressKeyboardLastTime;
100新增:
101新增: Point point;
102新增: Win32API.GetCursorPos(out point);
103新增: if (lastPoint.ToString() == point.ToString() && timeSpan.TotalSeconds > 10)
104新增: {
105新增: // 非鼠标或键盘激活
106新增: return;
107新增: }
108新增:
99109 status = SleepStatus.Wake;
100110 SleepStatusChanged?.Invoke(status);
101111 }
@@ -106,7 +116,7 @@ namespace Core.Servicers.Instances
106116 timer = new DispatcherTimer();
107117 timer.Interval = new TimeSpan(0, 2, 0);
108118#if DEBUG
109删除: timer.Interval = new TimeSpan(0, 0, 10);
119新增: //timer.Interval = new TimeSpan(0, 0, 10);
110120#endif
111121 timer.Tick += Timer_Tick;
112122 timer.Start();