epoc32/include/stdapis/time.h
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
     1.1 --- a/epoc32/include/stdapis/time.h	Wed Mar 31 12:27:01 2010 +0100
     1.2 +++ b/epoc32/include/stdapis/time.h	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -32,8 +32,7 @@
     1.4   * SUCH DAMAGE.
     1.5   *
     1.6   *	@(#)time.h	8.3 (Berkeley) 1/21/94
     1.7 - * © Portions copyright (c) 2005-2006 Nokia Corporation.  All rights reserved.
     1.8 - * © Portions copyright (c) 2008 Symbian Software Ltd. All rights reserved.
     1.9 + * © Portions Copyright (c) 2005-2008 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
    1.10   */
    1.11  
    1.12  /*
    1.13 @@ -95,6 +94,16 @@
    1.14  #endif
    1.15  
    1.16  #include <sys/timespec.h>
    1.17 +
    1.18 +/* POSIX.1b structure for timer start values and intervals.  */
    1.19 +struct itimerspec
    1.20 +  {
    1.21 +    struct timespec it_interval;
    1.22 +    struct timespec it_value;
    1.23 +  };
    1.24 +
    1.25 +/* We can use a simple forward declaration.  */
    1.26 +struct sigevent; 
    1.27  #endif /* __POSIX_VISIBLE >= 199309 */
    1.28  
    1.29  /* These macros are also in sys/time.h. */
    1.30 @@ -174,6 +183,32 @@
    1.31  /* XXX missing: clock_nanosleep() */
    1.32  IMPORT_C
    1.33  int nanosleep(const struct timespec *, struct timespec *);
    1.34 +
    1.35 +//////////////////////////LIBRT: START/////////////////////////////////
    1.36 +
    1.37 +/* Create new per-process timer using CLOCK_ID.  */
    1.38 +IMPORT_C int timer_create (clockid_t __clock_id,
    1.39 +                         struct sigevent *__restrict __evp,
    1.40 +                         timer_t *__restrict __timerid);
    1.41 +
    1.42 +/* Delete timer TIMERID.  */
    1.43 +IMPORT_C int timer_delete (timer_t __timerid);
    1.44 +
    1.45 +/* Set timer TIMERID to VALUE, returning old value in OVLAUE.  */
    1.46 +IMPORT_C int timer_settime (timer_t __timerid, int __flags,
    1.47 +                          const struct itimerspec *__restrict __value,
    1.48 +                          struct itimerspec *__restrict __ovalue);
    1.49 +
    1.50 +/* Get current value of timer TIMERID and store it in VLAUE.  */
    1.51 +IMPORT_C int timer_gettime (timer_t __timerid, struct itimerspec *__value);
    1.52 +
    1.53 +/* Get expiration overrun for timer TIMERID.  */
    1.54 +IMPORT_C int timer_getoverrun (timer_t __timerid);
    1.55 +
    1.56 +IMPORT_C int clock_nanosleep(clockid_t clock_id, int flags,
    1.57 +       const struct timespec *rqtp, struct timespec *rmtp);
    1.58 +//////////////////////////LIBRT: END/////////////////////////////////
    1.59 +
    1.60  #endif /* __POSIX_VISIBLE >= 199309 */
    1.61  
    1.62  #ifdef __SYMBIAN32__