Operation limited by time (vb.net)

IWeb

Newcomer
Joined
Sep 12, 2003
Messages
11
Hello,

I want to process an operation (e.g. a while loop) for a certain time (in seconds).
Is there a function/way in vb.net to count the passed time?
I tried to use timevalue.seconds but this return only the seconds from 1 to 60 from the local watch.

thank you,
 
ok. i developed a working but not good solution:

PHP:
        Dim tSpan As TimeSpan
        Dim tDate As Date
        Dim interval as integer=10

        tDate = Now

  
        While tSpan.Seconds < interval
            tSpan = DateTime.op_Subtraction(DateTime.Now, tDate)
        End While
 
Back
Top