【RTS笔记5】Timer

Soft Timer Facility

Clock and Timer

clock:不断增加,显示现在时间
Timer:不断减少(倒计时),时间到发出提醒

Hard Timers & Soft Timers
  • Hard Timers :are derived from physical timer chips that directly interrupt the processor when they expire.
  • Soft Timers :are software events that are scheduled through a software timer facility.

Handling Multiple Timers 处理多个计时器

A soft timer facility is a system tool that allows timers to be set up for which we can tolerate some bounded inaccuracy.

The soft timer facility has three main functions:

  1. Timer maintenance, i.e., counting down a timer.
  2. Timer installation, i.e., starting a timer.
  3. Timer removal, i.e., stopping a timer.

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值