- /* Some timer event, to be dispatched to the units */
- k = read(w->fd, &v, sizeof(v));
- if (k != sizeof(v)) {
-
- if (k < 0 && (errno == EINTR || errno == EAGAIN))
- break;
-
- log_error("Failed to read timer event counter: %s", k < 0 ? strerror(-k) : "Short read");
- return k < 0 ? -errno : -EIO;
- }
-
- if (w->type == WATCH_UNIT_TIMER)
- UNIT_VTABLE(w->data.unit)->timer_event(w->data.unit, v, w);
- else
- job_timer_event(w->data.job, v, w);
- break;
- }
-
- case WATCH_MOUNT:
- /* Some mount table change, intended for the mount subsystem */
- mount_fd_event(m, ev->events);
- break;
-
- case WATCH_SWAP:
- /* Some swap table change, intended for the swap subsystem */
- swap_fd_event(m, ev->events);
- break;
-
- case WATCH_UDEV:
- /* Some notification from udev, intended for the device subsystem */
- device_fd_event(m, ev->events);
- break;
+ HASHMAP_FOREACH(u, m->units, i)
+ if (UNIT_VTABLE(u)->time_change)
+ UNIT_VTABLE(u)->time_change(u);