Answer the question
In order to leave comments, you need to log in
How to test latency?
I'm trying to learn TDD and I don't understand how to test the time delay... For example, we send a button press to the window and wait 10 seconds... how can we test it?
Answer the question
In order to leave comments, you need to log in
Use
1. System.Timers.Timer
2. System.Windows.Forms.Timer
3. System.Threading.Timer
It's best not to use Thread.Sleep, as this will completely block the thread and prevent it from processing other messages.
Assuming that you have a single-threaded application (and they are the majority), your application will stop responding to all requests, and not just stop for a while, as you might think.
You can use System.Diagnostics.Stopwatct to control how long it actually took.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question