APISonar


lucee.runtime.timer.Stopwatch.time

> lucee > runtime > timer > Stopwatch > time
lucee APIs runtime APIs timer APIs Stopwatch APIs time APIs

Example 1
private void typeProcedures(Connection conn) throws SQLException, PageException {
		Stopwatch stopwatch = new Stopwatch(Stopwatch.UNIT_NANO);
		stopwatch.start();
		DatabaseMetaData metaData = conn.getMetaData();
		String schema = null;
		pattern = setCase(metaData, pattern);
		if (StringUtil.isEmpty(pattern, true)) {
			pattern = null;
		}

		lucee.runtime.type.Query qry = new QueryImpl(metaData.getProcedures(dbname(conn), schema, StringUtil.isEmpty(pattern) ? "%" : pattern), "query", pageContext.getTimeZone());
		qry.setExecutionTime(stopwatch.time());

		pageContext.setVariable(name, qry);
	}