LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Timer in Linux

Hello All,
does the function Timer() work in Linux ?
It always returns 0.
Any alternative for 'precise' timing (more precise than time() ) ?
--
Guillaume Dargaud
http://www.gdargaud.net/


0 Kudos
Message 1 of 3
(3,439 Views)
Answering my own post here...

> does the function Timer() work in Linux ?
> It always returns 0.
I couldn't get it to work even though the CVI documentation states that on
Linux the precision is 1ms.

> Any alternative for 'precise' timing (more precise than time() ) ?
I used a #define and then:
struct timeval tp;
gettimeofday(&tp, NULL);
return (double)tp.tv_sec + tp.tv_usec*1e-6;


Another minor bug I found in Linux: doing [shift][Tab] on the UIR doesn't
move back through the controls.
--
Guillaume Dargaud
http://www.gdargaud.net/
"When he was told that Apple Computer had just bought a Cray to help
design the next Apple Macintosh, Seymour Cray commented that he had just
bought a Macintosh to design the next Cray."


0 Kudos
Message 2 of 3
(3,419 Views)

Hi Guillaume,

Unfortunately we were unable to reproduce either of the issues you mentioned.  If I remember correctly from your previous posts, you are using some sort of derived version of Red Hat.  Thus we were wondering if you could test your code out on one of NI supported Linux versions found in the Using Linux with LabWindows/CVI section here. This would tell us if the issues you are having are due to that unsupported version.

Best Regards,

Jonathan N.
National Instruments
0 Kudos
Message 3 of 3
(3,351 Views)