"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const syncTime = require("./dist-es-frameloop-sync-time.cjs");
const frame = require("./dist-es-frameloop-frame.cjs");
const frameloopDriver = (update) => {
  const passTimestamp = ({ timestamp }) => update(timestamp);
  return {
    start: () => frame.frame.update(passTimestamp, true),
    stop: () => frame.cancelFrame(passTimestamp),
    /**
     * If we're processing this frame we can use the
     * framelocked timestamp to keep things in sync.
     */
    now: () => frame.frameData.isProcessing ? frame.frameData.timestamp : syncTime.time.now()
  };
};
exports.frameloopDriver = frameloopDriver;
//# sourceMappingURL=dist-es-animation-animators-drivers-driver-frameloop.cjs.map
