generative modeling for Rhino
I would like to measure the time elapsed between the beginning and the end of a part of a script in a vb.net component. I want to use Timer for this. It looks like :
Dim t_start As Single, t_end As Single, elapsed As Single
Dim i As Long, s As String
t_start = Timer
My script here
t_end = Timer
elapsed = CSng(Round(t_end - t_start, 2))
But I get an error message concerning the use of Timer ("Timer is a type and cannot be used as an expression").
Where is the problem ?
Replies are closed for this discussion.
Use System.Diagnostics.Stopwatch instead, it has better time keeping accuracy.