RandomImpl display and additional interfaces

This commit is contained in:
Mark Sturgill 2013-10-06 13:54:45 -07:00
parent d2c670f5c3
commit 306a96bc81
2 changed files with 10 additions and 0 deletions

View file

@ -478,6 +478,8 @@ namespace Server
if ( GCSettings.IsServerGC )
Console.WriteLine("Core: Server garbage collection mode enabled");
Console.WriteLine("RandomImpl: {0} ({1})", RandomImpl.Type.Name, RandomImpl.IsHardwareRNG ? "Hardware" : "Software");
while( !ScriptCompiler.Compile( m_Debug, m_Cache ) )
{
Console.WriteLine( "Scripts: One or more scripts failed to compile or no script files were found." );

View file

@ -38,6 +38,14 @@ namespace Server {
}
}
public static bool IsHardwareRNG {
get { return _Random is IHardwareRNG; }
}
public static Type Type {
get { return _Random.GetType(); }
}
public static double NextDouble() {
return _Random.NextDouble();
}