runTaskTimer question

Discussion in 'Plugin Development' started by Alshain01, Feb 20, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    Alshain01

    Consider the following (approximating time)

    Code:java
    1.  
    2. runnable.runTaskTimer(plugin, delay, period);
    3. runnable.runTaskTimer(this, 12000, 36000);
    4.  


    Does this run once in ~10 minutes and again every ~30 minutes after. Or does it run once in ~40 minutes and every ~30 minutes after?

    Or to phrase differently, does the delay indicate the time of the first run or the time when the first count down begins and the first run is only after that countdown is finsihed?
     
  2. Offline

    Aqua

    Delay determines the duration until the first time the task is ran, from that point it uses the 'period' for every next run.
     
  3. Offline

    L33m4n123

    Source: http://jd.bukkit.org/rb/apidocs/org/bukkit/scheduler/BukkitScheduler.html

    so in your case. it waits 10 minutes to run the first time
    and then every 30 minutes it repeats itself
     
  4. Offline

    Alshain01

    Well, that's how I interpreted the API docs, but for some reason the first run doesn't occur for me. I was looking through the CB code to confirm but I can't find it.
     
Thread Status:
Not open for further replies.

Share This Page