Google Apps Script: How to update this formula to update automatically?

It has come to my attention that GoogleClock no longer works on new sheets, however I can update the following code so you can update every minute:

Tried to put = SheetNames (NOW ())

He says it's not allowed. I'm very new to the scripts, below the script I found here:

function SheetNames () {// Use as a custom function: = SheetNames (GoogleClock ())
try {
var sheets = SpreadsheetApp.getActiveSpreadsheet (). getSheets ()
var out = new Array (sheets.length + 1);
//outside[0] = [ "Name" , "gid" ];
for (var i = 3; i <sheets.length + 1; i ++) out[i-7] = [sheets[i-1].getName ()];
go out
}
catch (err) {
come back "#ERROR!"
SheetNames.flush ();
}
}