54 lines
1.2 KiB
C#
Raw Permalink Normal View History

#region Using Statements
using ANX.Framework.NonXNA;
using ANX.Framework.NonXNA.PlatformSystem;
using System;
2012-10-10 19:26:53 +00:00
using ANX.Framework.NonXNA.Development;
#endregion
2011-10-31 05:36:24 +00:00
// This file is part of the ANX.Framework created by the
// "ANX.Framework developer group" and released under the Ms-PL license.
// For details see: http://anxframework.codeplex.com/license
2011-10-31 05:36:24 +00:00
namespace ANX.Framework
{
//TODO: this class is public on Windows Phone
2012-10-10 19:26:53 +00:00
[Developer("Glatzemann")]
internal class GameTimer
{
private INativeGameTimer nativeImplementation;
private TimeSpan lastUpdate;
public GameTimer()
{
nativeImplementation = PlatformSystem.Instance.CreateGameTimer();
nativeImplementation.Reset();
lastUpdate = nativeImplementation.ElapsedTime;
}
public void Update()
{
nativeImplementation.Update();
lastUpdate = nativeImplementation.ElapsedTime;
}
public TimeSpan Elapsed
{
get
{
return nativeImplementation.ElapsedTime;
}
}
public long Timestamp
{
get
{
return nativeImplementation.Timestamp;
}
}
}
2011-10-31 05:36:24 +00:00
}