Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Threading;
- namespace Recetas.Multithreading.Cap01
- {
- public sealed class UsoSleep
- {
- public static void Main()
- {
- for (int i = 1; i <= 5; ++i)
- {
- Console.WriteLine ("Pausa por 2 segundos...");
- // Detiene el thread por 2 segundos:
- Thread.Sleep (2000); // Alternativo Thread.Sleep (TimeSpan.FromSeconds(2));
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement