epoc32/include/stdapis/time.h
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
equal deleted inserted replaced
3:e1b950c65cb4 4:837f303aceeb
    30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    31  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    31  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    32  * SUCH DAMAGE.
    32  * SUCH DAMAGE.
    33  *
    33  *
    34  *	@(#)time.h	8.3 (Berkeley) 1/21/94
    34  *	@(#)time.h	8.3 (Berkeley) 1/21/94
    35  * © Portions copyright (c) 2005-2006 Nokia Corporation.  All rights reserved.
    35  * © Portions Copyright (c) 2005-2008 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
    36  * © Portions copyright (c) 2008 Symbian Software Ltd. All rights reserved.
       
    37  */
    36  */
    38 
    37 
    39 /*
    38 /*
    40  * $FreeBSD: src/include/time.h,v 1.32 2005/04/02 12:33:27 das Exp $
    39  * $FreeBSD: src/include/time.h,v 1.32 2005/04/02 12:33:27 das Exp $
    41  */
    40  */
    93 typedef	__timer_t	timer_t;
    92 typedef	__timer_t	timer_t;
    94 #define	_TIMER_T_DECLARED
    93 #define	_TIMER_T_DECLARED
    95 #endif
    94 #endif
    96 
    95 
    97 #include <sys/timespec.h>
    96 #include <sys/timespec.h>
       
    97 
       
    98 /* POSIX.1b structure for timer start values and intervals.  */
       
    99 struct itimerspec
       
   100   {
       
   101     struct timespec it_interval;
       
   102     struct timespec it_value;
       
   103   };
       
   104 
       
   105 /* We can use a simple forward declaration.  */
       
   106 struct sigevent; 
    98 #endif /* __POSIX_VISIBLE >= 199309 */
   107 #endif /* __POSIX_VISIBLE >= 199309 */
    99 
   108 
   100 /* These macros are also in sys/time.h. */
   109 /* These macros are also in sys/time.h. */
   101 #if !defined(CLOCK_REALTIME) && __POSIX_VISIBLE >= 200112
   110 #if !defined(CLOCK_REALTIME) && __POSIX_VISIBLE >= 200112
   102 #define CLOCK_REALTIME	0
   111 #define CLOCK_REALTIME	0
   172 IMPORT_C
   181 IMPORT_C
   173 int clock_settime(clockid_t, const struct timespec *);
   182 int clock_settime(clockid_t, const struct timespec *);
   174 /* XXX missing: clock_nanosleep() */
   183 /* XXX missing: clock_nanosleep() */
   175 IMPORT_C
   184 IMPORT_C
   176 int nanosleep(const struct timespec *, struct timespec *);
   185 int nanosleep(const struct timespec *, struct timespec *);
       
   186 
       
   187 //////////////////////////LIBRT: START/////////////////////////////////
       
   188 
       
   189 /* Create new per-process timer using CLOCK_ID.  */
       
   190 IMPORT_C int timer_create (clockid_t __clock_id,
       
   191                          struct sigevent *__restrict __evp,
       
   192                          timer_t *__restrict __timerid);
       
   193 
       
   194 /* Delete timer TIMERID.  */
       
   195 IMPORT_C int timer_delete (timer_t __timerid);
       
   196 
       
   197 /* Set timer TIMERID to VALUE, returning old value in OVLAUE.  */
       
   198 IMPORT_C int timer_settime (timer_t __timerid, int __flags,
       
   199                           const struct itimerspec *__restrict __value,
       
   200                           struct itimerspec *__restrict __ovalue);
       
   201 
       
   202 /* Get current value of timer TIMERID and store it in VLAUE.  */
       
   203 IMPORT_C int timer_gettime (timer_t __timerid, struct itimerspec *__value);
       
   204 
       
   205 /* Get expiration overrun for timer TIMERID.  */
       
   206 IMPORT_C int timer_getoverrun (timer_t __timerid);
       
   207 
       
   208 IMPORT_C int clock_nanosleep(clockid_t clock_id, int flags,
       
   209        const struct timespec *rqtp, struct timespec *rmtp);
       
   210 //////////////////////////LIBRT: END/////////////////////////////////
       
   211 
   177 #endif /* __POSIX_VISIBLE >= 199309 */
   212 #endif /* __POSIX_VISIBLE >= 199309 */
   178 
   213 
   179 #ifdef __SYMBIAN32__
   214 #ifdef __SYMBIAN32__
   180 IMPORT_C
   215 IMPORT_C
   181 int clock_getcpuclockid(pid_t , clockid_t *);
   216 int clock_getcpuclockid(pid_t , clockid_t *);