raptor 10 Posted July 4, 2016 Title. I need a stopwatch and don't want to roll my own. Does Dreambot ship with any of these common libs, or is there a way to ship a script with these dependencies?
Mad 86 Posted July 4, 2016 they are supported if they are open source and you include it as source afaik
Dreamlicker 750 Posted July 4, 2016 If you include a library and you're only using a tiny part of it, only put that part in. Large libraries are not allowed, and you can't include .jars.
raptor 10 Author Posted July 4, 2016 Thanks all. @Diddy, thanks for pointing out that class. Unfortunately the documentation for it is non-existent
Hopewelljnj 46 Posted July 4, 2016 setRunTime sets time until done. finished() returns whether it's done. remaining() returns how much time is left. Pretty self explanatory if you ask me By stop watch do you mean something that activates at a certain time or something that counts up. The dreambot timer is very good for counting up. If you need something that runs after a certain time just use the Java Timer with .schedule and create a TimerTask
raptor 10 Author Posted July 5, 2016 setRunTime sets time until done. finished() returns whether it's done. remaining() returns how much time is left. Pretty self explanatory if you ask me By stop watch do you mean something that activates at a certain time or something that counts up. The dreambot timer is very good for counting up. If you need something that runs after a certain time just use the Java Timer with .schedule and create a TimerTask Sure it's possible to figure out what the methods do based on their names, but the lack of documentation is still very frequently annoying. For example, how would I use the timer to count up? It's possible to figure it out of course, but that might be something a well-documented API would address. I ended up going with the Google Guava Stopwatch which addressed my needs.
Hopewelljnj 46 Posted July 5, 2016 Sure it's possible to figure out what the methods do based on their names, but the lack of documentation is still very frequently annoying. For example, how would I use the timer to count up? It's possible to figure it out of course, but that might be something a well-documented API would address. I ended up going with the Google Guava Stopwatch which addressed my needs. .elapsed() ?? anyhow there is actually a large project to add to the documentation for db3 which our devs are very busy with at the moment. I think it will be better at that point in time. They aren't spending time updating these docs as many are going to change with the new Dreambot
Dreamlicker 750 Posted July 5, 2016 in onStart long started = System.currentTimeMillis(); in onPaint drawString("Runtime: " + (System.currentTimeMillis() - started) / 1000, 25, 25); there isnt always a need to create a class to do something
Mad 86 Posted July 5, 2016 in onStart long started = System.currentTimeMillis(); in onPaint drawString("Runtime: " + (System.currentTimeMillis() - started) / 1000, 25, 25); there isnt always a need to create a class to do something Help pls code doesn't compile
Recommended Posts
Archived
This topic is now archived and is closed to further replies.