title: macOS system events for network status in Swift
body: <p>is there any system event which I can use in my program to detect a network change on macOS? I would like to call a function if the network state change, without having a lookup every x seconds in my program. Currently I'm using 'scheduledTimer' to make a lookup...</p>
  
  <p>Is there a better solution for that?</p>