usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;usingSystem.Threading.Tasks;namespaceConsoleApp3{classProgram{staticvoidMain(string[]args){varnow=DateTime.Now;varrand=newRandom();for(vari=0;i<10;++i){// one second stagger to make sure it starts after the first remediationintstaggerBy=1;foreach(varpinnew[]{new{Interval=120},new{Interval=120}}){staggerBy+=60;intrandomPing=rand.Next(0,p.Interval);DateTimetoStart=DateTime.Now.Add(newTimeSpan(0,0,staggerBy+randomPing));Console.WriteLine((toStart-now).TotalSeconds);}Console.WriteLine();}Console.WriteLine("Press any key to exit . . .");Console.ReadKey();}}}
Comments (0)
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.