LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.nET

How to capture the time taken to Start and Stop the Code using .net function?

0 Kudos
Message 1 of 9
(3,096 Views)

Compare start with stop time.

0 Kudos
Message 2 of 9
(3,084 Views)

I employed System.Timer(DBL) constructor from .NET pallette but did not get the desired result.Any methods to employ this functionality with .Net functions?

0 Kudos
Message 3 of 9
(3,077 Views)

As far as I know, the .NET timing functions are not ideal for this, they have a reduced accuracy in comparison with direct kernel32 calls. Why are you doing this in .NET? Use the LabVIEW tick counts function to determine time passed.

 

P.S. The .NET System.Timer function is for creating regular events for controlling repeating processes, not to calculate elapsed times.

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 4 of 9
(3,073 Views)

I would also choose GetTime LabVIEW funtion. When you subtract old start from stop you geht the difference as double in seconds.

0 Kudos
Message 5 of 9
(3,071 Views)

There is also a function starting in LV 2010 (not in the palettes) called "High Resolution Relative Seconds.vi"

 

http://forums.ni.com/t5/LabVIEW/New-LV2010-VI-High-Resolution-Relative-Seconds/td-p/1213011

 

 

Message 6 of 9
(3,068 Views)

Thanks for the reply . I am aware of the tickcount and Get timestamp function and i just wanted to explore the timing capabilities with .net Functions . 

0 Kudos
Message 7 of 9
(3,061 Views)

@vishal.r wrote:

Thanks for the reply . I am aware of the tickcount and Get timestamp function and i just wanted to explore the timing capabilities with .net Functions . 


So why are you programming in LabVIEW? Smiley Wink

 

(Couldn't resist)

0 Kudos
Message 8 of 9
(3,054 Views)

Probably people in .NET Forum give you the better answer.

0 Kudos
Message 9 of 9
(3,050 Views)