文件

executiontimeInseconds.

在代码的分布部分获取执行时间以秒为单位

描述

例子

exculitytimes.=NthsectionProfile..executiontimeInseconds.返回执行时间的向量,以秒为单位,用于代码的分布部分。每个元素exculitytimes.包含在该部分的开始和末尾的定时器读取之间的差异。

如果你设置了codeprofilingsaveOptions.参数到'summoundonly'NthsectionProfile..executiontimeInseconds.返回一个空数组。要更改该参数,请按按键打开“配置参数”对话框Ctrl + E., 打开确认窗格下面代码生成,改变保存选项参数到所有数据

例子

全部收缩

使用模型进行模拟,该模型被配置为生成具有执行时间测量的工作区变量。

RTWDEMO_SIL_TOPMODEL;set_param('RTWDEMO_SIL_TOPMODEL''codeexecutionprofiming''在');set_param('RTWDEMO_SIL_TOPMODEL''simulationMode''软件 - 循环(SIL)');set_param('RTWDEMO_SIL_TOPMODEL''codeprofilinginstrumentation''在');set_param('RTWDEMO_SIL_TOPMODEL''codeprofilingsaveOptions''alldata');SIM('RTWDEMO_SIL_TOPMODEL');
模拟生成工作区变量executionProfile.(默认)。

在模拟结束时,获取第七码部分的配置文件。

seventhsectionprofile = executionprofile.sections(7);

获取代码部分的执行时间向量。

time_vector = seventhsectionprofile.executiontimeInseconds;

输入参数

全部收缩

由此产生的对象Coder.Profile.executionTime.财产章节

输出参数

全部收缩

执行时间,以秒为单位,用于代码部分。作为向量返回。

在R2013A介绍