This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Display and provide simulation time

  • Library:
  • Simulink / Sources


The Clock block outputs the current simulation time at each simulation step. This block is useful for other blocks that need the simulation time.

When you need the current time within a discrete system, use the Digital Clock block.



expand all

Sample time, specified as the current simulation time at each simulation time step.

Data Types: double


expand all

Select this check box to display the simulation time as part of the Clock block icon. When you clear this check box, the simulation time does not appear on the block icon.

Programmatic Use

Block Parameter: DisplayTime
Type: character vector
Values: 'off' | 'on'
Default: 'off'

Specify the interval at which Simulink® updates the Clock icon as a positive integer.

Suppose that the decimation is 1000. For a fixed integration step of 1 millisecond, the Clock icon updates at 1 second, 2 seconds, and so on.


To display the simulation time on the block icon, you must select the Display time check box.

Programmatic Use

Block Parameter: Decimation
Type: character vector
Value: scalar
Default: '10'

Block Characteristics

Data Types


Direct Feedthrough


Multidimensional Signals


Variable-Size Signals


Zero-Crossing Detection


Extended Capabilities

Introduced before R2006a