Example Code

Measure Operating Time

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.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview

This example demonstrates determining the length of time in seconds an application takes to run.

 

Description

Two timestamps are taken, one before the application is run and one after. The difference of these two values is the amount of time the application took to run. The System Exec VI is used so that any application that can be run from the command line can be monitored with this VI. This example can also be modified to measure the amount of time different pieces of code takes to run.

 

Requirements

LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code
1. Run the VI.
2. Look within the computer the executable you would like to run.
3. Select the Start Program Button.


Additional Information or References

Snippet.png


Thank You
Eric Reid
National Instruments
Motion R&D

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