diff options
| author | Tyge Løvset <[email protected]> | 2023-06-07 10:35:38 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2023-06-07 19:56:11 +0200 |
| commit | 56469c2738effe6d44a3a0c44e821c0ff18ce28e (patch) | |
| tree | 3bfe712740a7f4bd6cbfcea115b581def9071828 /docs/ccommon_api.md | |
| parent | 7c57f4fb7edf33d030975a04160f183f71c48ecd (diff) | |
| download | STC-modified-56469c2738effe6d44a3a0c44e821c0ff18ce28e.tar.gz STC-modified-56469c2738effe6d44a3a0c44e821c0ff18ce28e.zip | |
cco: Minor internal cleanup + added cco_timer_elapsed().
Diffstat (limited to 'docs/ccommon_api.md')
| -rw-r--r-- | docs/ccommon_api.md | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/docs/ccommon_api.md b/docs/ccommon_api.md index 1fd8af75..930b8881 100644 --- a/docs/ccommon_api.md +++ b/docs/ccommon_api.md @@ -385,14 +385,15 @@ To resume the coroutine from where it was suspended with *cco_yield()*, simply c | | `cco_sem_await(sem)` | Await for the semaphore count > 0 | | | `cco_sem_await(sem, ret)` | Await with ret on the semaphore | | `cco_sem` | `cco_sem_init(long value)` | Set semaphore value | -| | `cco_sem_release(sem)` | Signal the semaphore | +| | `cco_sem_release(sem)` | Signal the semaphore (count += 1) | | | Timers: | | | | `cco_timer` | Timer type | -| | `cco_timer_await(tm)` | Await for timer to expire | -| | `cco_timer_await(tm, ret)` | Await with ret for timer to expire | -| | `cco_timer_start(tm, double sec)` | Start timer for sec seconds (usec prec.)| +| | `cco_timer_await(tm, double sec)` | Await secs for timer to expire (usec prec.)| +| | `cco_timer_await(tm, double sec, ret)`| Await secs for timer with ret value | +| | `cco_timer_start(tm, double sec)` | Start timer for secs duration | | | `cco_timer_restart(tm)` | Restart timer with same duration | | `bool` | `cco_timer_expired(tm)` | Return true if timer is expired | +| `double` | `cco_timer_elapsed(tm)` | Return seconds elapsed | | `double` | `cco_timer_remaining(tm)` | Return seconds remaining | | | From caller side: | | | `void` | `cco_stop(co)` | Next call of coroutine finalizes | |
