Time Nick Message 02:00 ANAND For #7587, I'm planning to run the on_wielditem_change callback if the item has been selected for at least n milliseconds, so as to not trigger the wielditem change callbacks for all items in the middle when using the mouse wheel. Does MT use some sort of a cross-platform timer class or library elsewhere in the code? 02:00 ShadowBot https://github.com/minetest/minetest/issues/7587 -- Implement on_wielditem_change callback registration by ClobberXD 02:02 ANAND Hmm, it just occured to me that a ton of things make use of timers like ABMs, node-timers, etc. 02:03 ANAND I'll take a look at how they're implemented :) 02:22 ANAND Both ABMs and NodeTimers are too complicated :/ 02:26 ANAND Aha, found a class called TimeTaker while digging into the profiler :D 04:17 ANAND There's also another class IntervalLimiter which is used in PlayerSAO for things like breath timer and node damage timer. 04:18 sofar if you're doing things in C++ you should never use ABM or NodeTimers, those are for Lua only 04:18 sofar the IntervalLimiter class sounds like what you want 04:49 ANAND I was trying to see what timer MT uses for implementing ABMs and NodeTimers. I wasn't going to use ABMs and NodeTimers for this :P 04:50 ANAND TimeTaker seems to suit me better, IntervalLimiter seems to be for running callbacks at regular intervals. 05:07 ANAND Hmm... IntervalLimiter might actually be better that TimeTaker, as I'm planning to check for the time each step. 05:07 ANAND better than* 16:53 ANAND #7587 is ready for testing and review 16:53 ShadowBot https://github.com/minetest/minetest/issues/7587 -- Implement on_wielditem_change callback registration by ClobberXD 16:54 ANAND I know a couple of my PR numbers by heart (like #7557) :) 16:54 ShadowBot https://github.com/minetest/minetest/issues/7557 -- Expose player FOV to Lua API by ClobberXD