Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

loop for specific time c#

var stopwatch = new Stopwatch();
stopwatch.Start();

while(stopwatch.Elapsed < TimeSpan.FromSeconds(5))
{
    // Execute your loop here...
}
 
PREVIOUS NEXT
Tagged: #loop #specific #time
ADD COMMENT
Topic
Name
3+5 =