import { time } from "./dist-es-frameloop-sync-time.js";
import { frameData, cancelFrame, frame } from "./dist-es-frameloop-frame.js";
const frameloopDriver = (update) => {
  const passTimestamp = ({ timestamp }) => update(timestamp);
  return {
    start: () => frame.update(passTimestamp, true),
    stop: () => cancelFrame(passTimestamp),
    /**
     * If we're processing this frame we can use the
     * framelocked timestamp to keep things in sync.
     */
    now: () => frameData.isProcessing ? frameData.timestamp : time.now()
  };
};
export {
  frameloopDriver
};
//# sourceMappingURL=dist-es-animation-animators-drivers-driver-frameloop.js.map
