当前位置: 首页>>代码示例>>C#>>正文


C# Machine.ObtainClockSource方法代码示例

本文整理汇总了C#中System.Machine.ObtainClockSource方法的典型用法代码示例。如果您正苦于以下问题:C# Machine.ObtainClockSource方法的具体用法?C# Machine.ObtainClockSource怎么用?C# Machine.ObtainClockSource使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Machine的用法示例。


在下文中一共展示了Machine.ObtainClockSource方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: TegraTimer

 public TegraTimer(Machine machine)
 {
     IRQ = new GPIO();
     sync = new object();
     clockSource = machine.ObtainClockSource();
     Reset();
 }
开发者ID:rte-se,项目名称:emul8,代码行数:7,代码来源:TegraTimer.cs

示例2: ComparingTimer

 public ComparingTimer(Machine machine, long frequency, long compare, long limit)
 {
     if(compare > limit || compare < 0)
     {
         throw new ConstructionException(string.Format(CompareHigherThanLimitMessage, compare, limit));
     }
     this.limit = limit;
     initialCompare = compare;
     clockSource = machine.ObtainClockSource();
     clockSource.AddClockEntry(new ClockEntry(compare, ClockEntry.FrequencyToRatio(this, frequency), CompareReached, false, workMode: WorkMode.OneShot));
 }
开发者ID:rte-se,项目名称:emul8,代码行数:11,代码来源:ComparingTimer.cs

示例3: LimitTimer

        public LimitTimer(Machine machine, long frequency, long limit = int.MaxValue, Direction direction = Direction.Descending, bool enabled = false, WorkMode workMode = WorkMode.Periodic)
        {
            if(limit == 0)
            {
                throw new ArgumentException("Limit cannot be zero.");
            }
            irqSync = new object();
            clockSource = machine.ObtainClockSource();

            initialFrequency = frequency;
            initialLimit = limit;
            initialDirection = direction;
            initialEnabled = enabled;
            initialWorkMode = workMode;
            InternalReset();
        }
开发者ID:rte-se,项目名称:emul8,代码行数:16,代码来源:LimitTimer.cs

示例4: SimpleTicker

 public SimpleTicker(long periodInMs, Machine machine)
 {
     var clockSource = machine.ObtainClockSource();
     clockSource.AddClockEntry(new ClockEntry(periodInMs, ClockEntry.FrequencyToRatio(this, 1000), OnTick));
 }
开发者ID:rte-se,项目名称:emul8,代码行数:5,代码来源:SimpleTicker.cs

示例5: PowerPc

 public PowerPc(string cpuType, Machine machine, EndiannessEnum endianness = EndiannessEnum.BigEndian): base(cpuType, machine, endianness)
 {
     irqSync = new object();
     machine.ObtainClockSource().AddClockEntry(
         new ClockEntry(long.MaxValue/2, ClockEntry.FrequencyToRatio(this, 128000000), DecrementerHandler, false, Direction.Descending));
 }
开发者ID:bhuvanchandra,项目名称:emul8,代码行数:6,代码来源:PowerPc.cs


注:本文中的System.Machine.ObtainClockSource方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。