Files
klezVirus-ThreadPoolExecChain/ThreadPoolExecChain/Rand.cpp
T
2025-12-21 22:51:42 +01:00

14 lines
238 B
C++

#include <intrin.h>
#include "Rand.h"
unsigned int RandintMod3()
{
unsigned __int64 t = __rdtsc();
// Mix bits a little
t ^= (t >> 17);
t ^= (t << 31);
t ^= (t >> 8);
return (unsigned int)(t % 3);
}