CCBlueX Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Timer in script

    Scripts
    script
    2
    3
    212
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Aknee Jahe
      Aknee Jahe last edited by

      How would I make a timer in my script like this?

      private Timer timer = new Timer();
      
      if(timer.hasTimeElapsed(1000, false))
         //do something
      
      CookieChinese 1 Reply Last reply Reply Quote 0
      • CookieChinese
        CookieChinese @Aknee Jahe last edited by

        @Aknee-Jahe
        You can use the MSTimer in LiquidBounce

        var MSTimer = Java.type("net.ccbluex.liquidbounce.utils.timer.MSTimer");
        
        var timer = new MSTimer();
        
        if (timer.hashTimePassed(1000))
            // do something
        
        // Use reset() to reset the timer
        timer.reset();
        
        Aknee Jahe 1 Reply Last reply Reply Quote 0
        • Aknee Jahe
          Aknee Jahe @CookieChinese last edited by

          @CookieChinese thank you ❤

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          About
          • Terms of Service
          • Privacy Policy
          • Status
          • Contact Us
          Downloads
          • Releases
          • Source code
          • License
          Docs
          • Tutorials
          • CustomHUD
          • AutoSettings
          • ScriptAPI
          Community
          • Forum
          • Guilded
          • YouTube
          • Twitter
          • D.Tube