mtcp_settimer 3 2017-02-02 "Linux" "mOS Library Functions Manual"
NAME
mtcp_settimer - register user's timer-based callback handler
SYNOPSIS
#include <mos_api.h> "int mtcp_settimer(mctx_t " mctx ", int " id ", struct timeval *" timeout ", callback_t " cb );
DESCRIPTION
mtcp_settimer () can be used to register callback handler function, "cb", that is invoked after a time interval of "timeout" microseconds. Note that this callback is a one time registration and "cb" (see mtcp_register_callback () for definition) is called only once when "timeout" period expires. The "id" argument is a unique identifier that is passed to "cb" as one of the function arguments. mtcp_settimer () call takes an additional argument named "mctx" that represents the per-core mTCP context in an application (see mtcp_create_context() for details). """""""""""""""""""""""""""""""""""""""""""""""""""""""""""
RETURN VALUE
On success 0 is returned; -1 on failure. """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"""".SH CONFORMING TO
""""POSIX.1-2001.
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
AUTHORS
mOS development team <[email protected]> """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
SEE ALSO
mtcp_register_callback (), mtcp_socket (), """""""""""""""""""""""""""""""""""""""""""""""""""""
COLOPHON
This page is part of mOS release 0.3 "docs" section. A description of the project, and information about reporting bugs, can be found at \%http://mos.kaist.edu/. """""""""""""""""""""""""""""""""""""""""""""""""""""