ClockStep.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import freezeObject from './freezeObject.js';
  2. /**
  3. * Constants to determine how much time advances with each call
  4. * to {@link Clock#tick}.
  5. *
  6. * @exports ClockStep
  7. *
  8. * @see Clock
  9. * @see ClockRange
  10. */
  11. var ClockStep = {
  12. /**
  13. * {@link Clock#tick} advances the current time by a fixed step,
  14. * which is the number of seconds specified by {@link Clock#multiplier}.
  15. *
  16. * @type {Number}
  17. * @constant
  18. */
  19. TICK_DEPENDENT : 0,
  20. /**
  21. * {@link Clock#tick} advances the current time by the amount of system
  22. * time elapsed since the previous call multiplied by {@link Clock#multiplier}.
  23. *
  24. * @type {Number}
  25. * @constant
  26. */
  27. SYSTEM_CLOCK_MULTIPLIER : 1,
  28. /**
  29. * {@link Clock#tick} sets the clock to the current system time;
  30. * ignoring all other settings.
  31. *
  32. * @type {Number}
  33. * @constant
  34. */
  35. SYSTEM_CLOCK : 2
  36. };
  37. export default freezeObject(ClockStep);