LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Timer

Hi,

 

Need some help:

 

Any time I used Timer() or Delay()...

 

I am getting this message:    "winbase.h"(2645,6)   Redeclaration of 'CVI_GetFileSize' previously declared at utility.h:584.

I don't see how to fixe this.  any help??

 

Here a simple function I am trying:

 


 void time1 (void)

// #include <utility.h>
//#include <ansi_c.h>

{
 double startTime, endTime;
 int i;
 
 startTime = Timer();
 
 for (i=0; i<5; i++)
 {
  Delay (1);
  endTime = Timer();
  printf("Time in loop = %f seconds.\n", endTime - startTime);
  startTime = endTime;
 }
 printf("Press any key to continue...\n");
 GetKey();
 
}

 

0 Kudos
Message 1 of 2
(2,597 Views)

Problem solved. I needed to include

 #include <windows.h>

0 Kudos
Message 2 of 2
(2,592 Views)