Return a utc timestamp, make sure heapq in correct order.
(self, entry, next_time_to_run, mktime=timegm)
| 312 | return False, self.max_interval |
| 313 | |
| 314 | def _when(self, entry, next_time_to_run, mktime=timegm): |
| 315 | """Return a utc timestamp, make sure heapq in correct order.""" |
| 316 | adjust = self.adjust |
| 317 | |
| 318 | as_now = maybe_make_aware(entry.default_now()) |
| 319 | |
| 320 | return (mktime(as_now.utctimetuple()) + |
| 321 | as_now.microsecond / 1e6 + |
| 322 | (adjust(next_time_to_run) or 0)) |
| 323 | |
| 324 | def populate_heap(self, event_t=event_t, heapify=heapq.heapify): |
| 325 | """Populate the heap with the data contained in the schedule.""" |