Admin Production ni-theme
Current Publication

ProgressBar_GetTotalTimeEstimate

LabWindows/CVI

ProgressBar_GetTotalTimeEstimate

int ProgressBar_GetTotalTimeEstimate (int panel, int progressBarCtrl, double *expectedTime);

Purpose

Returns the estimated duration of the task that is associated with the progress bar.

The estimated total time of the task is used to determine the rate at which the progress bar advances when you set the ATTR_PROGRESSBAR_UPDATE_MODE attribute to VAL_PROGRESSBAR_AUTO_MODE.

If you enable ATTR_PROGRESSBAR_AUTO_ADJUST, this value can change gradually to match the actual time elapsed in each progress bar session.

Parameters

Input
Name Type Description
panel int The specifier for a particular panel that is currently in memory. You obtain this handle from LoadPanel, NewPanel, or DuplicatePanel.
progressBarCtrl int The ID you specified as the slideCtrl parameter in the ProgressBar_ConvertFromSlide function call or the ID returned by the ProgressBar_Create function.
Output
Name Type Description
expectedTime double The current time estimate for the task, in seconds.

The default time estimate for a new progress bar is 10 seconds.

Return Value

Name Type Description
status int Return value indicating whether the function was successful. A negative number indicates that an error occurred. Call the GetGeneralErrorString toolbox function to get a descriptive error message.

Additional Information

Library: Progress Bar Control

Include file: custctrl\progressbar.h

LabWindows/CVI compatibility: LabWindows/CVI 2009 and later