00001 #include "osl/misc/random.h" 00002 #include <boost/random/mersenne_twister.hpp> 00003 #include <time.h> 00004 unsigned int osl::misc::random() 00005 { 00006 static boost::mt11213b mt_random; 00007 return mt_random(); 00008 } 00009 00010 unsigned int osl::misc::time_seeded_random() 00011 { 00012 static boost::mt11213b mt_random(time(0)); 00013 return mt_random(); 00014 }