on the gateway if you go to the diagnostics tab there should be a tab called scripts where you should be able to see some additional information on the running scripts. there is also a spot to check gateway CPU usage in the overview of the diagnostics tab.
Get rid of that import system, you should never import libraries from within a function, only within the module itself. Importing libraries within functions causes unnecessary performance impacts. However, you should never import the system library itself. This is *always available (except under certain circumstances pre v8.3)
Re the OP, you can check timer and other gateway event scripts execution stats from the Web portal. This function doesn't look like it's doing much though