Show More
Commit Description:
Add timers for Simulation and various engines...
Commit Description:
Add timers for Simulation and various engines Starting to add additional timers for different stages of the process of updating in order to get more insight into what is slowing it down. The update takes 9ms, which is much longer than it used to. Engine-specific timers are coming later.
File last commit:
Show/Diff file:
Action:
FNA/src/Audio/RendererDetail.cs
79 lines | 1.3 KiB | text/x-csharp | CSharpLexer
Early working version (including all dependencies, lol).
r0 #region License
/* FNA - XNA4 Reimplementation for Desktop Platforms
* Copyright 2009-2020 Ethan Lee and the MonoGame Team
*
* Released under the Microsoft Public License.
* See LICENSE for details.
*/
#endregion
#region Using Statements
using System;
#endregion
namespace Microsoft.Xna.Framework.Audio
{
[Serializable]
public struct RendererDetail
{
#region Public Properties
public string FriendlyName
{
get;
private set;
}
public string RendererId
{
get;
private set;
}
#endregion
#region Internal Constructor
internal RendererDetail(string name, string id) : this()
{
FriendlyName = name;
RendererId = id;
}
#endregion
#region Public Methods
public override bool Equals(object obj)
{
return ( (obj is RendererDetail) &&
RendererId.Equals(((RendererDetail) obj).RendererId) );
}
public override int GetHashCode()
{
return RendererId.GetHashCode();
}
public override string ToString()
{
return FriendlyName;
}
#endregion
#region Public Static Operator Overloads
public static bool operator==(RendererDetail left, RendererDetail right)
{
return left.RendererId.Equals(right.RendererId);
}
public static bool operator!=(RendererDetail left, RendererDetail right)
{
return !left.RendererId.Equals(right.RendererId);
}
#endregion
}
}