Example Code

Measuring Execution Time of a Code using LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.


  • LabVIEW

Code and Documents


Download All

This example VI enable you to measure the execution time of a code.

This basic VI allows you to measure the execution time of the code in the middle segment of the sequence structure. This can be useful for troubleshooting and for performance metrics. In the VI, two tick counters are used to measure the difference in time between the starting and ending. The execution time is shown in milisecond.


  • LabVIEW Base Development System 2012 (or compatible)

Steps to Implement or Execute Code

  1. Open the VI "Execution Time 2012 NIVerified.vi"
  2. Run the program.


Additional Information or References
VI Block Diagram


 **This document has been updated to meet the current required format for the NI Code Exchange.**

Bogdan Buricea
Applications Engineer
National Instruments

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.