New implementation

Be concise.

Be useful.

All contributions dictatorially edited by webmasters to match personal tastes.

Please do not paste any copyright violating resource.

Please try to avoid dependencies to third-party libraries and frameworks.

Other implementations
#include <stdlib.h>
#include <time.h>
srand((unsigned)time(0));
import std.datetime, std.random;
rndGen.seed(cast(uint)Clock.currTime.stdTime);
import std.datetime, std.random;
auto rng = Random(cast(uint)Clock.currTime.stdTime);
var r = new Random(new DateTime.now().millisecondsSinceEpoch);
import "math/rand"
import "time"
r := rand.New(rand.NewSource(time.Now().UnixNano()))
import "math/rand"
import "time"
rand.Seed(time.Now().UnixNano())
import System.Random
getStdGen
import java.util.Random;
Random rand = new Random(System.currentTimeMillis());
math.randomseed( os.time() )
srand(time());
echo rand();
Randomize;
srand time;
import random
rand = random.Random()
Random.new