Admin Production ni-theme
Current Publication

omp_get_wtime

LabWindows/CVI

omp_get_wtime

double omp_get_wtime (void);

Purpose

Returns the elapsed wall clock time in seconds since an arbitrary, but consistent, point in the past.

Note Note  The OpenMP Run-Time Library is available only in the LabWindows/CVI Full Development System.

The value this function returns is bound to the calling thread and is consistent for each thread; however, it is not guaranteed to be globally consistent across all other threads in the program.

Use this function to measure the time taken by a task, as shown in the following example:

double startTime;
double endTime;
startTime = omp_get_wtime();
...code representing work you want to time...
endTime = omp_get_wtime();
printf("This task took %f seconds\n", endTime - startTime);

Binding thread set: encountering thread

Parameters

None.

Return Value

Name Type Description
returnValue double The elapsed wall clock time in seconds since an arbitrary, but consistent, point in the past.

Additional Information

Library: OpenMP Run-Time Library

Include file: omp.h

LabWindows/CVI compatibility: LabWindows/CVI 2013 and later

Example

Refer to OpenMP\matrixmult.cws for an example of using the omp_get_wtime function.