mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-06 11:14:58 -06:00
29 lines
388 B
C++
Executable File
29 lines
388 B
C++
Executable File
// Common/Random.cpp
|
|
|
|
#include "StdAfx.h"
|
|
|
|
#include <stdlib.h>
|
|
|
|
#ifndef _WIN32
|
|
#include <time.h>
|
|
#else
|
|
#include "MyWindows.h"
|
|
#endif
|
|
|
|
#include "Random.h"
|
|
|
|
void CRandom::Init(unsigned int seed) { srand(seed); }
|
|
|
|
void CRandom::Init()
|
|
{
|
|
Init((unsigned int)
|
|
#ifdef _WIN32
|
|
GetTickCount()
|
|
#else
|
|
time(NULL)
|
|
#endif
|
|
);
|
|
}
|
|
|
|
int CRandom::Generate() const { return rand(); }
|