Guest User

Untitled

a guest
Jul 20th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. public class Global : System.Web.HttpApplication
  2. {
  3. Timer timerUpdate = new Timer();
  4.  
  5. protected void Application_Start(object sender, EventArgs e)
  6. {
  7. timerUpdate.Interval = 1000;
  8. timerUpdate.Elapsed += TimerUpdate_Elapsed;
  9. timerUpdate.Start();
  10. }
  11.  
  12. private void TimerUpdate_Elapsed(object sender, ElapsedEventArgs e)
  13. {
  14. timerUpdate.Stop();
  15.  
  16. // do something
  17. }
  18. }
Add Comment
Please, Sign In to add comment