本文整理汇总了C#中ITimer.start方法的典型用法代码示例。如果您正苦于以下问题:C# ITimer.start方法的具体用法?C# ITimer.start怎么用?C# ITimer.start使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ITimer
的用法示例。
在下文中一共展示了ITimer.start方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: setParts
/// <summary>
/// Sets the currently used parts and starts the computer
/// </summary>
/// <param name="binaryPath">Path to the binary to execute</param>
/// <param name="cpu">The selected cpu module</param>
/// <param name="ram">The selected ram module</param>
/// <param name="timing">The selected timer</param>
/// <param name="hardware">The selected generic hardware</param>
public void setParts(string binaryPath, ICpu cpu, IRam ram, ITimer timing, List<IHardware> hardware)
{
this.cpu = cpu;
this.ram = ram;
this.hardware = hardware;
loadFile(binaryPath);
//Start a new thread which prints the registers to the console.
new Thread((ThreadStart)delegate
{
while (true)
{
//Convert the current cpu status to a string
string s = cpu.getRegisterSnapshot().Aggregate("", (current, register) => current + (register + "; "));
//Add the PC special register to the string
s += cpu.getSpecialRegisters()[0] + "; ";
AdvConsole.Debug(s);
}
}).Start();
timing.start();
}