mtcp_settimer − register user’s timer-based callback handler
#include <mos_api.h>
int mtcp_settimer(mctx_t mctx, int id, struct timeval *timeout, callback_t cb);
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).
On success 0 is returned; -1 on failure.
mOS development team <[email protected]>
mtcp_register_callback(), mtcp_socket(),
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/.