Solved Checking for dates?

Discussion in 'Plugin Development' started by Tim_M, Sep 5, 2021.

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


    I'm trying to make it so the user can specify on what days, and what hours of those days (irl) it should be raining in-game. I have 2 dates. One is when the next rain should start and when it should end. How can I detect when the start date has been reached? Checking every minute or so doesn't seem very efficient. Is there any other ways?
  2. Offline


    It should be fine. It is just some integer comparisons.
    Tim_M likes this.
  3. Offline


    Like Karim said, it should be fine. Running a check every minute has close to 0 performance impact. You could do it every second and it would still be fine.

    But you could always calculate the time until the next moment and schedule a delayed task.
    KarimAKL and Tim_M like this.
  4. Offline


    Alright thanks!
Thread Status:
Not open for further replies.

Share This Page