• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# TimerType类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中TimerType的典型用法代码示例。如果您正苦于以下问题:C# TimerType类的具体用法?C# TimerType怎么用?C# TimerType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



TimerType类属于命名空间,在下文中一共展示了TimerType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: create

        public static HRTimer create(TimerType type)
        {

            HRTimer timer = null;

            switch (type)
            {

                case TimerType.DEFAULT:
                    {
                        timer = new DefaultTimer();
                        break;
                    }
                case TimerType.MULTI_MEDIA:
                    {

                        timer = new MultiMediaTimer();
                        break;
                    }
                case TimerType.TIMER_QUEUE:
                    {
                        timer = new TimerQueueTimer();
                        break;
                    }

            }

            return (timer);
        }
开发者ID:iejeecee,项目名称:mediaviewer,代码行数:29,代码来源:HRTimerFactory.cs


示例2: PutTimerType

        public async Task<IHttpActionResult> PutTimerType(int id, TimerType timerType)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            if (id != timerType.TimerTypeID)
            {
                return BadRequest();
            }

            db.Entry(timerType).State = EntityState.Modified;

            try
            {
                await db.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!TimerTypeExists(id))
                {
                    return NotFound();
                }
                else
                {
                    throw;
                }
            }

            return StatusCode(HttpStatusCode.NoContent);
        }
开发者ID:goonit,项目名称:Log_My_WOD_API,代码行数:32,代码来源:TimerTypesController.cs


示例3: CreateTimer

 public Timer CreateTimer(float duration, TimerType type = TimerType.Once, int times = -1)
 {
     ++timerid;
     Timer t = new Timer(duration, timerid, type, times);
     timers.Add(timerid, t);
     return t;
 }
开发者ID:lfwelove,项目名称:lbp,代码行数:7,代码来源:TimerManager.cs


示例4: Timer

		public Timer(float time, float time2)
		{
			Time1 = time;
			Time2 = time2;
			MyType = TimerType.RANDOM_TWO_CONSTANTS;
			Reset();
		}
开发者ID:ADoby,项目名称:Summoneer,代码行数:7,代码来源:Timer.cs


示例5: Add

 public static Timer Add(TimerType timerType, TimerCycles timerCycles, double timerLength)
 {
     string timerID = Guid.NewGuid().ToString();
     Timer timer = Add(timerID, timerType, timerCycles, timerLength);
     timer.TimerID = timerID;
     return timer;
 }
开发者ID:Isthimius,项目名称:Gondwana,代码行数:7,代码来源:Timers.cs


示例6: Event

 public Event(object actor, int delay, TimerType type, string method, object[] arguments)
 {
     Actor = actor;
     Delay = delay;
     Type = type;
     Method = method;
     Arguments = arguments;
 }
开发者ID:carriercomm,项目名称:PolaMUD,代码行数:8,代码来源:GameLoop.cs


示例7: Timer

 internal Timer(TimerType timerType, TimerCycles timerCycles, long startTick, double len)
 {
     Type = timerType;
     Cycles = timerCycles;
     StartTick = startTick;
     LastEventTick = startTick;
     Length = (long)(len * (double)HighResTimer.TicksPerSecond);
     Paused = false;
 }
开发者ID:Isthimius,项目名称:Gondwana,代码行数:9,代码来源:Timer.cs


示例8: Timer

 public Timer(float duration, int timerId, TimerType type = TimerType.Once, int times = -1)
 {
     countDown = 0.0f;
     this.duration = duration;
     this.timerId = timerId;
     this.type = type;
     state = Phase.NeverStart;
     this.times = times;
 }
开发者ID:lfwelove,项目名称:lbp,代码行数:9,代码来源:Timer.cs


示例9: GetTimer

 public static ITimer GetTimer(TimerType timerType)
 {
     switch (timerType)
     {
         case TimerType.Inverted:
             return new FwTimer(1, TimerType.Inverted);
         default:
             return new FwTimer(1, TimerType.Normal);
     }
 }
开发者ID:Delacrowa,项目名称:project1,代码行数:10,代码来源:FwTimerFactory.cs


示例10: Timer

 public Timer(double duration, TimerType timerType, string parameter, bool failContract)
     : base("")
 {
     this.duration = duration;
     this.timerType = timerType;
     this.parameter = parameter;
     this.fakeFailures = !failContract;
     
     disableOnStateChange = false;
 }
开发者ID:linuxgurugamer,项目名称:ContractConfigurator,代码行数:10,代码来源:Timer.cs


示例11: TimerElement

	public TimerElement (string text, float duration, TimerType type, System.Action onEnd=null) {
		Text = text;
		this.duration = duration
		#if FAST_TIME
		* 0.1f
		#endif
		;
		this.type = type;
		this.onEnd = onEnd;
		Reset ();
	}
开发者ID:engagementgamelab,项目名称:AtStake_v2,代码行数:11,代码来源:TimerElement.cs


示例12: FwTimer

 public FwTimer()
 {
     // to be sure everything is initialized
     _running = false;
     _interval = DEFAULT_INTERVAL;
     _timer = new Timer {AutoReset = false};
     _timer.Elapsed += OnElapse;
     _status = TimerLogStatus.Disabled;
     _type = TimerType.Inverted;
     _startTime = DateTime.Now;
     _endTime = _startTime.AddSeconds(_interval);
 }
开发者ID:Delacrowa,项目名称:project1,代码行数:12,代码来源:FwTimer.cs


示例13: PostTimerType

        public async Task<IHttpActionResult> PostTimerType(TimerType timerType)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            db.TimerTypes.Add(timerType);
            await db.SaveChangesAsync();

            return CreatedAtRoute("DefaultApi", new { id = timerType.TimerTypeID }, timerType);
        }
开发者ID:goonit,项目名称:Log_My_WOD_API,代码行数:12,代码来源:TimerTypesController.cs


示例14: SetAffect

        public void SetAffect(string name, Mob afflicted, Mob owner, TimerType durationType, int duration, bool tickmethod, bool endmethod)
        {
            Name = name;
            HandlingName = name.ToLower().Trim();
            Duration = duration;
            DurationType = durationType;
            Owner = owner;
            Afflicted = afflicted;
            Level = Owner.Level;

            CanHasTickMethod = tickmethod;
            CanHasEndMethod = endmethod;
        }
开发者ID:ramseur,项目名称:PolaMUD,代码行数:13,代码来源:Affect.cs


示例15: StartTimer

		static public void StartTimer (TimerType which)
		{
			timer_start [(int) which] = DateTime.Now;
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:4,代码来源:report.cs


示例16: Stop

		public void Stop (TimerType type)
		{
			if (timers != null) {
				timers[(int) type].Stop ();
			}
		}
开发者ID:Profit0004,项目名称:mono,代码行数:6,代码来源:report.cs


示例17: Start

		public void Start (TimerType type)
		{
			if (timers != null) {
				var sw = new Stopwatch ();
				timers[(int) type] = sw;
				sw.Start ();
			}
		}
开发者ID:Profit0004,项目名称:mono,代码行数:8,代码来源:report.cs


示例18: SetRepeatThumbAreaTimer

		private void SetRepeatThumbAreaTimer ()
		{
			timer.Enabled = false;
			timer.Interval = 50;
			timer_type = TimerType.RepeatThumbArea;
			timer.Enabled = true;
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:7,代码来源:ScrollBar.cs


示例19: SetHoldThumbAreaTimer

		private void SetHoldThumbAreaTimer ()
		{
			timer.Enabled = false;
			timer.Interval = 200;
			timer_type = TimerType.HoldThumbArea;
			timer.Enabled = true;
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:7,代码来源:ScrollBar.cs


示例20: SetRepeatButtonTimer

		private void SetRepeatButtonTimer ()
		{
			timer.Enabled = false;
			timer.Interval = 50;
			timer_type = TimerType.RepeatButton;
			timer.Enabled = true;
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:7,代码来源:ScrollBar.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# TimestampsToReturn类代码示例发布时间:2022-05-24
下一篇:
C# TimerState类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap