other-licenses/7zstub/src/Common/Random.cpp

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:18c380e8cd43
1 // Common/Random.cpp
2
3 #include "StdAfx.h"
4
5 #include <time.h>
6 #include <stdlib.h>
7
8 #include "Common/Random.h"
9
10 void CRandom::Init(unsigned int seed)
11 { srand(seed); }
12
13 void CRandom::Init()
14 { Init((unsigned int)time(NULL)); }
15
16 int CRandom::Generate() const
17 { return rand(); }

mercurial