Tasks: Tick Difference

Discussion in 'Spigot Help' started by saiparm, Sep 11, 2019.

  1. What is the difference between 0 and 1 ticks on a repeating task?
  2. Because you're talking about a repeating task, I'll assume you're talking about the period variable.

    It looks like there's not much of a difference. If you look at craftbukkit on stash, you'll see that when scheduling a repeating task, this method is called (for sync tasks, anyway, though async is basically the same), which verifies the period value. <= -1 means the task won't be repeated at all, 0 means a period of 1 tick will be used and any value higher than that will be used as the number of ticks between successive task executions. So a period of 0 ticks actually means a period of 1 tick will be used instead.
    • Agree Agree x 1
    • Informative Informative x 1
  3. So there is no difference between using 0 or 1 on a repeating task?
  4. no difference
    • Agree Agree x 2
  5. Thank you very much I've been trying to explain that to my friends for over a century now =D