Maniac runs on two timers, a 4-second timer to refresh your Hysteria stacks, and an 8-second timer for it to decay. It's a bit of an open secret these two timers will, over the course of a heist, desync, making the deck less and less consistent as time goes on.
This mod aims to fix that.
For the curious, when the timer expires, there is an inherent delay in execution before the code that restarts the timer will run. This delay cannot be avoided, and when the timers are a static four and eight seconds respectively, it means the timer will slowly drift away from a "real" interval. In my testing, I've found the timer will fall behind to the tune of roughly 0.1 seconds per minute. In other words, by the ten minute mark, your timer will be an entire second behind what's expected. These two timers will drift at different rates, thus resulting in the desync.
This mod measures how late the timer is to start, and subtracts that amount of time from the next timer. So if, as an extreme example, it took a whopping 0.5 seconds from when the 4 second refresh timer ends and the next one begins, the timer's duration is reduced to 3.5 seconds instead in order to keep that 4 second mark. This solves what I believe to be the root of the desync, in order for both timers to be consistently on time and in-sync.
This mod works as client and host, and from my testing does not affect other maniac players in the lobby. Enjoy!
Mods folder.

