import { ClockRange, JulianDate } from "cesium";
import { Clock } from "resium";

// 起始时间
const start = JulianDate.fromDate(new Date());
// 结束时间
const stop = JulianDate.addSeconds(start, 30, new JulianDate());

function CustomClock() {
  return (
    <Clock
      multiplier={1}
      shouldAnimate={false}
      startTime={start.clone()}
      stopTime={stop.clone()}
      currentTime={start.clone()}
      clockRange={ClockRange.LOOP_STOP}
      // onTick={(clock) => {
      //   if (!clock.shouldAnimate) return;
      // }}
    />
  );
}

export default CustomClock;
