Loading

Paste #pupk7see6

  1.         local delay_time = 5 * 74; // Check events every 5 days.
  2.         if (delay_time > new_goal_timeout)  delay_time = new_goal_timeout;
  3.         if (delay_time > monitor_timeout)   delay_time = monitor_timeout;
  4.         if (delay_time > finished_timeout)  delay_time = finished_timeout;
  5.  
  6.         if (delay_time > 0) this.Sleep(delay_time);
  7.  
  8.         new_goal_timeout  -= delay_time;
  9.         monitor_timeout   -= delay_time;
  10.         finished_timeout  -= delay_time;

Comments