在objective-c中,我曾经基于以下CoreGraphics调用来实现我的空闲计时器:CGEventSourceSecondsSinceLastEventType(kCGEventSourceStateCombinedSessionState,kCGAnyInputEventType);现在在swift中,使用相同的基本调用,它看起来像:CGEventSourceSecondsSinceLastEventType(CGEventSourceStateID.CombinedSessionState,CGEventType.MouseMoved)在检查了头文件(例如定义了CGEven