+ 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
3 Antworten
+ 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*/
+ 1
the idea of my program is to calculate time of playing on PlayStation device for customers
0
Ask in freelancer url: freelancer.com or مستقل or خمسات