时间源状态常量 | ||
---|---|---|
常量 | 描述 | 值 |
time_source_state_initial | The Time Source has not been started yet | 0 |
time_source_state_active | The Time Source has been started and is counting down | 1 |
time_source_state_paused | The Time Source is paused | 2 |
time_source_state_stopped | The Time Source was stopped or it completely expired | 3 |
时间源可以具有一个状态,该状态可以是上面的任何一个常量。新创建的时间源的默认状态为 time_source_state_initial。
可以使用 time_source_start()、time_source_stop() 和 time_source_pause() 来更改状态。
时间源的状态使用 time_source_get_state() 返回。