title: how can i find the exact tick in netlogo in which agents take an action?
body: <hr>
  
  <p>I have agents that their devices may face failure randomly and based on the probability of failure. (working-devices? false)
  when the device does not work, I should calculate the summary of waiting-time till now and then update the status of the device (working-devices? true).</p>
  
  <p>My problem is in update part. 
  let assume the waiting-time = 1 and we are in tick = 10 that working-device? become false, and we do our model for 365 days(ticks).
  In updating, I should let my status became true if tick > 11 ( 10 + 1 ).
  11 means (the-tick + waiting time). </p>
  
  <p><strong>My questions is how can I understand in which tick the status became false?
  and what is the best way to write my update procedure?</strong> </p>
  
  <pre><code>;; waiting-time is slider (for example ) 1
  
  breed [ customers customer] 
  ....
  
  customers-own [device-working? real-waiting-time? ... ]
  
  to setup
  ....
  ask customers [
   set real-waiting-time 0
   set device-working? true
  .....
  ]
  end
  
  to go
    if ticks &lt; 365  [
    ask customers [if (device-working? = true)
    [ impose update]
   ]
  
  to impose 
   if random 100 &gt; 95
   [set device-working? false
    set real-waiting-time real-waiting-time + waiting-time ]
  end
  
  to update
  ;; let the-tick when devices of customers faces failure
  ;; if tick &gt; the-tick + waiting-time-slider and device-working? = false 
  ;; [set device-working? true]
  
  end
  </code></pre>