Here is an example code for a script deployment which has the log level set to DEBUG:
var date1 = new Date();
nlapiLogExecution('DEBUG', 'time entered script', date1);
var date2 = new Date();
nlapiLogExecution('DEBUG', 'time exited script', date2);
The user can enter these two log executions in sections of your code where you want to track the execution time. He/she can view the script deployment execution logs to view these entries.