summaryrefslogtreecommitdiffstats
path: root/other-licenses/7zstub/src/Common/Random.cpp
blob: 85d275c237f8e49a69991a72b10764fc2eda1204 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Common/Random.cpp

#include "StdAfx.h"

#include <time.h>
#include <stdlib.h>

#include "Common/Random.h"

void CRandom::Init(unsigned int seed)
  { srand(seed); }

void CRandom::Init()
  { Init((unsigned int)time(NULL)); }

int CRandom::Generate() const
  { return rand(); }