#include "FastUse.h"

#include "Utils/TimeUtils.h"

auto FastUse::onWorldTick(Player* _this) -> void {
	auto gamemode = _this->getGameMode();
	if (!gamemode) return;

	long long now = Utils::Time::getMs();
	static long long start = now;
	if (now - start >= 1000.f / speed) {
		gamemode->releaseUsingItem();
		start = now;
	}
}
