private void DrawStats(SpriteBatch batch, GameTime gameTime)
{
epoc += gameTime.ElapsedGameTime.TotalSeconds;
if (epoc >= 0.1)
{
epoc = 0f;
var bifrost = _gameServer.LookupSystem<BifrostServer>();
stats = bifrost.GetStats();
clientCount = _gameServer.EntityManager.GetEntities(Aspect.One(typeof(PlayerComponent))).Count;
}
if (stats == null) return;
var scale = Matrix.CreateScale(0.5f);
batch.Begin(transformMatrix: scale);
batch.DrawString(_font, "In Kbps: " + Math.Round(stats.BytesInPerSec/1024f * 8f,1), new Vector2(1320, 10), Color.Red);
batch.DrawString(_font, "Out Kbps: " + Math.Round(stats.BytesOutPerSec/ 1024f * 8f, 1), new Vector2(1305, 40), Color.Red);
batch.DrawString(_font, "Clients: " + clientCount, new Vector2(1320, 70), Color.Red);
batch.End();
}