+ 2

I need a smart way to creat timers dynamically in c#

hello everybody i'm developing a program like a cafe station for a game center shop i need to creat timers or stopwatches dinamically knowing that : no. of timer is variable thank u in advance

28th Nov 2016, 3:43 PM
Mahmoud Kamal
Mahmoud Kamal - avatar
3 odpowiedzi
+ 4
Did you mean timers that delays stuff? If so, you can use : using System.Threading; thread.sleep(1000); //1sec If you are using async, .Do(async (arg) => { await task.Delay(1000); //1sec }); If you meant a system that records/display time, try this: int y = 1; while (y=1) { Console.WriteLine(CurrentTime.Now); /*I kind of forgot the code for displaying current time, google it for a safer bet*/ thread.sleep(1000); } /*Displays the time every 1second*/
28th Nov 2016, 8:43 PM
Wen Qin
Wen Qin - avatar
+ 1
the idea of my program is to calculate time of playing on PlayStation device for customers
28th Nov 2016, 9:31 PM
Mahmoud Kamal
Mahmoud Kamal - avatar
0
Ask in freelancer url: freelancer.com or مستقل or خمسات
29th Nov 2016, 8:28 PM
Ahmed S Elhadedy
Ahmed S Elhadedy - avatar