Lely core libraries
2.2.5
|
This file is part of the I/O library; it contains the implementation of the user-defined timer. More...
#include "../timer.h"
#include <lely/libc/threads.h>
#include <lely/io2/ctx.h>
#include <lely/io2/user/timer.h>
#include <lely/util/errnum.h>
#include <lely/util/time.h>
#include <lely/util/util.h>
#include <assert.h>
#include <stdlib.h>
Go to the source code of this file.
Data Structures | |
struct | io_user_timer |
Functions | |
io_timer_t * | io_user_timer_create (io_ctx_t *ctx, ev_exec_t *exec, io_user_timer_setnext_t *func, void *arg) |
Creates a new user-defined timer. More... | |
void | io_user_timer_destroy (io_timer_t *timer) |
Destroys a user-defined timer. More... | |
This file is part of the I/O library; it contains the implementation of the user-defined timer.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or useried. See the License for the specific language governing permissions and limitations under the License.
Definition in file timer.c.
io_timer_t* io_user_timer_create | ( | io_ctx_t * | ctx, |
ev_exec_t * | exec, | ||
io_user_timer_setnext_t * | func, | ||
void * | arg | ||
) |
Creates a new user-defined timer.
ctx | a pointer to the I/O context with which the timer should be registered. |
exec | a pointer to the executor used to execute asynchronous tasks. |
func | a pointer to the function to be invoked when the expiration time is updated (can be NULL). |
arg | the user-specific value to be passed as the second argument to func. |
void io_user_timer_destroy | ( | io_timer_t * | timer | ) |
Destroys a user-defined timer.