mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-06-18 15:17:23 +08:00

* Better Aimbot * Revert "Better Aimbot" This reverts commit 176824ad20ca46a9ec5bda79eeb5784d8bd277d9. * Better Aimbot * Flying Axe * Aimbot smoothing * More fixes & improvements * Little missing detail * Fixed * Improvements -switch to using inline -switched timer to steady_clock -changed axe lerp to "Lagrange's Interpolation" - i hope girl is satisfied XD * PEMDAS * Comment!
37 lines
611 B
C++
37 lines
611 B
C++
#pragma once
|
|
#include <chrono>
|
|
|
|
namespace big
|
|
{
|
|
class timer
|
|
{
|
|
public:
|
|
explicit timer(std::chrono::milliseconds delay) :
|
|
m_timer(std::chrono::steady_clock::now()),
|
|
m_delay(delay)
|
|
{
|
|
}
|
|
|
|
bool updated()
|
|
{
|
|
auto now = std::chrono::steady_clock::now();
|
|
if (std::chrono::duration_cast<std::chrono::milliseconds>(now - m_timer) >= m_delay)
|
|
{
|
|
m_timer = now;
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
void set_delay(std::chrono::milliseconds delay)
|
|
{
|
|
m_delay = delay;
|
|
}
|
|
|
|
private:
|
|
std::chrono::steady_clock::time_point m_timer;
|
|
std::chrono::milliseconds m_delay;
|
|
};
|
|
}
|