mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 02:00:05 +08:00
Fix json code format in blog (#639)
* Update 2017-02-11-vim8-new-feature-timers-zh_cn.md * Update 2017-02-11-vim8-new-feature-timers-zh_cn.md
This commit is contained in:
parent
55240fea60
commit
b626ac4d5c
@ -31,15 +31,16 @@ let timer = timer_start(500, 'MyHandler',
|
||||
|
||||
这个方法会返回一个存储定时器信息的列表, 当编号为 ID 的定时器不存在,将返回一个空的列表,当直接调用这个方法, 而不传递任何参数时,将返回所有定时器的信息。返回列表中每一个元素实际上是一个字典数据类型,具体的结构如下:
|
||||
|
||||
|
||||
{
|
||||
"id" : 该定时器的 ID,
|
||||
"time" : 定时器启动是所设置的毫秒数,
|
||||
"remaining" : 距定时器启动还剩余的毫秒数,
|
||||
"repeat" : 定时器还需要重复执行的次数,无限执行则返回 -1,
|
||||
"callback" : 回调函数,
|
||||
"paused" : 是否被暂停,是则返回 1,否则返回 0
|
||||
}
|
||||
```json
|
||||
{
|
||||
"id" : "该定时器的 ID",
|
||||
"time" : "定时器启动是所设置的毫秒数",
|
||||
"remaining" : "距定时器启动还剩余的毫秒数",
|
||||
"repeat" : "定时器还需要重复执行的次数,无限执行则返回 -1",
|
||||
"callback" : "回调函数",
|
||||
"paused" : "是否被暂停,是则返回 1,否则返回 0"
|
||||
}
|
||||
```
|
||||
|
||||
#### 暂停定时器
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user