May be the following will help:
Stopwatch s = new Stopwatch();
s.Start();
while (s.Elapsed < TimeSpan.FromSeconds(600))
{
//
}
s.Stop();
More Related Contents:
- Given a filesystem path, is there a shorter way to extract the filename without its extension?
- How to create and use resources in .NET
- How to use the Paint event to draw shapes at mouse coordinates
- Properly draw text using GraphicsPath
- 5.7.57 SMTP – Client was not authenticated to send anonymous mail during MAIL FROM error
- How to draw directly on the Windows desktop, C#?
- Nullable vs. int? – Is there any difference?
- C# thread safety with get/set
- Sum of digits in C#
- Why does TimeSpan.ParseExact not work
- Uncompressing gzip response from WebClient
- How to compare Unicode characters that “look alike”?
- How can I create a more user-friendly string.format syntax?
- C# WinForms ErrorProvider Control
- Calculate a MD5 hash from a string
- Curious null-coalescing operator custom implicit conversion behaviour
- What is ApplicationException for in .NET?
- Log4Net Logging of two different levels to two different appenders for the same logger
- Get member to which attribute was applied from inside attribute constructor?
- Manual editing of *.designer.cs file
- How to set json serializer settings in asp.net core 3?
- How to access a WinForms control from another thread i.e. synchronize with the GUI thread?
- WPF event binding from View to ViewModel?
- Get list of local computer usernames in Windows
- C# – How to change PNG quality or color depth
- How to find path to .cs file by its type in C#
- Create custom shape for button
- Convert Date from Persian to Gregorian
- DataGridView bound to BindingList does not refresh when value changed
- Xamarin Android Finalizer not getting called when leaving the activity to go to another Activity