Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Diagnostics;
- using System.Threading;
- namespace Timer
- {
- public class Timer
- {
- private const int time = 400;
- public static Action<string> delegat = Console.WriteLine;
- public static void PrintMessage(string msg, int time)
- {
- while (true)
- {
- Timer.delegat(msg);
- Thread.Sleep(time);
- }
- }
- static void Main(string[] args)
- {
- PrintMessage("Hello", time);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement