2 * include/timer.h - type representing the timer object used to manage the
\r
3 * time allocated to a command.
\r
5 * Copyright 2008,2009 Martin Quinson, Malek Cherier All right reserved.
\r
7 * This program is free software; you can redistribute it and/or modify it
\r
8 * under the terms of the license (GNU LGPL) which comes with this package.
\r
11 * This file contains all the declarations of the functions related with
\r
12 * the tesh timer type.
\r
26 /*! \brief timer_new - create a new timer.
\r
28 * \param command The command to keep a wath.
\r
30 * \return If successful the function returns the newly created
\r
31 * timer. Otherwise the function returns NULL and sets the
\r
32 * global variable errno with the appropiate error code.
\r
35 * [EINVAL] if the parameter is invalid.
\r
36 * [ENOMEM] if the system has not enough space to allocate
\r
39 ttimer_t
\r timer_new(command_t command);
41 /*! \brief timer_free - destroy a timer object.
\r
43 * \param ptr A pointer to the timer object to destroy.
\r
45 * \return If successful the function returns the 0. Otherwise
\r
46 * the function returns -1 and sets the global variable
\r
47 * errno with the appropiate error code.
\r
50 * [EINVAL] if the timer object pointed to by the parameter ptr is invalid.
\r
54 int
\r timer_free(ttimer_t * ptr);
55 \r \r void
\r timer_time(ttimer_t timer);
56 \r \r void
\r timer_wait(ttimer_t timer);
62 #endif /* !__TIMER_H */
\r