()
| 1039 | |
| 1040 | // Function to start ping interval |
| 1041 | function startPingInterval() { |
| 1042 | // Clear any existing interval |
| 1043 | if (pingInterval) { |
| 1044 | clearInterval(pingInterval); |
| 1045 | } |
| 1046 | |
| 1047 | // Start new interval to ping every 5 seconds (5000ms) |
| 1048 | pingInterval = setInterval(measurePing, 5000); |
| 1049 | |
| 1050 | // Also do an initial ping |
| 1051 | setTimeout(measurePing, 100); |
| 1052 | } |
| 1053 | |
| 1054 | // Function to check if core directory exists and contains required files |
| 1055 | function checkCoreDirectory() { |