This project detects if it has internet access with an accuracy of 0.1 secs. It does not necessarily detect when you toggle the wifi switch, but rather if the system has disconnected this project from the internet.