import { createWatchlist as s } from "../../reactive/watchlist/main.js";
import { createInterval as n } from "../interval/main.js";
import { struct as a } from "../../../utils/struct/main.js";
import { enumerable as r } from "../../../utils/struct/property.js";
const f = (() => {
  let e;
  const { cancelSubscriptions: o, requestNotification: c, subscribe: i, on: t } = s({
    // Use wrapper function instead of direct reference to `Date.now`,
    // otherwise, tests will fail since `Date.now` won't be mocked
    now: () => Date.now()
  });
  return t.resume = () => {
    e = n(c, 1e3, !1);
  }, t.idle = () => {
    e?.cancel(), e = void 0;
  }, a({
    cancelSubscriptions: r(o),
    subscribe: r(i)
  });
})();
export {
  f as clock,
  f as default
};
