當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。