sipxportlib  Version 3.3
Public Member Functions | List of all members
UtlRandom Class Reference

#include <UtlRandom.h>

Public Member Functions

 UtlRandom ()
 UtlRandom (int seed)
virtual ~UtlRandom ()
int rand ()

Detailed Description

A simple utility class that provides random number functionality. Generally, you should create a UtlRandom class for each of your thread contexts. The implementation uses rand() and srand().

Constructor & Destructor Documentation

UtlRandom ( )

Default constructors, seeds the random number generator with the current time.

UtlRandom ( int  seed)

Constructor accepting a seed for the random number generator.

~UtlRandom ( )


Member Function Documentation

int rand ( )

Generate a pseudo-random number between 0 and RAND_MAX (defined in stdlib.h)