3
Answers

I want to run my code with specific time everyday

Feroz Khan

Feroz Khan

1y
582
1

Dear All, Please need your support i dovleped one application and there while loop which keep runining and condition there is spcific time like if time reach 13:00 then go to next code its working fine no issue found but only one issue while loop keep runinig and chekcing time for this system process using like 25% and more how can i reduce this and or is there another way to run application with spcific time without consuming system high processing. please advice below code for your refrence.

while (true)
{
    if (System.DateTime.Now.ToString("HH:mm") == "13:15")
    {
        int i;
        for (i = 0; i < 35; i++)
        {
        }
    }
    else
    {  }
}

 

Answers (3)