Scheduling without use of timer class in c#

You can try something basic like this: public class TimeSchedule { private bool hasRun; private DateTime targetDate = new DateTime(2015,5,26); private void Schedule() { while (!hasRun) { if (DateTime.Now.Date < targetDate) { //Do something hasRun = true; } else { Thread.Sleep(1000); } } } public void Start() { var thread = new Thread(Schedule); thread.Start(); } … Read more

Creating simple countdowns in javascript

You can use Javascript to do that: <!DOCTYPE html> <html lang=”en”> <head> <meta charset=”UTF-8″> <title>Welcome to My Page!</title> </head> <body> <div id=”about-me”></div> </body> <script> function get_message() { var my_birthday = new Date(“2/13/1996”); // update your birthday here var today = new Date(); var time_diff = Math.abs(today.getTime() – my_birthday.getTime()); // get the difference in milliseconds between … Read more