Skip to content

Instantly share code, notes, and snippets.

@baobao
Last active Feb 4, 2019
Embed
What would you like to do?
using System.Windows.Forms;
using SlimDX.Windows;
class Program
{
// エントリーポイント
static void Main()
{
using (Game game = new Game())
{
game.Run();
}
}
}
class Game : Form
{
System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch();
public void Run()
{
sw.Start();
MessagePump.Run(this, Draw);
}
private void Draw()
{
// 毎フレーム経過時間を調べるために経過時間を出力
System.Console.WriteLine(sw.ElapsedMilliseconds);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment