webengine/wmlengine/src/utils/include/nwx_time.h
changeset 0 dd21522fd290
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     1 /*
       
     2 * Copyright (c) 1999 - 2001 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 /***************************************************************************
       
    20 **   File: nwx_time_h
       
    21 **   Subsystem Name:Time
       
    22 **   Purpose:   Provides Time manipulation routines in a platform independent
       
    23 **              manner.
       
    24 ***************************************************************************/
       
    25 #ifndef NWX_TIME_H
       
    26 #define NWX_TIME_H
       
    27 
       
    28 #ifdef __cplusplus
       
    29 extern "C" {
       
    30 #endif
       
    31 
       
    32 /*
       
    33 ** Includes
       
    34 */
       
    35 
       
    36 #include "nwx_defs.h"
       
    37 
       
    38 /*
       
    39 ** Type Declarations
       
    40 */
       
    41 
       
    42 /* UTC (GMT) system time in seconds since Jan 1st, 1970 */
       
    43 typedef NW_Uint32 NW_Time_t;
       
    44 
       
    45 /*UTC Time*/
       
    46 typedef struct {
       
    47   NW_Uint16 Year;          /* eg. 1999, 2000, ... */
       
    48   NW_Uint16 Month;         /* Jan = 1, Feb = 2, ... */
       
    49   NW_Uint16 Day;           /* 1st = 1, ... 31st = 31 */
       
    50   NW_Uint16 DayOfWeek;     /* Sun = 0, Mon = 1, ... */
       
    51   NW_Uint16 Hour;          /* 0 to 23 */
       
    52   NW_Uint16 Minute;        /* 0 to 59 */
       
    53   NW_Uint16 Second;        /* 0 to 59 */
       
    54   NW_Uint16 Milliseconds;  /* 0 to 999 */
       
    55 } NW_Time_Tm_t;
       
    56 
       
    57 
       
    58 /*
       
    59 ** Global Function Declarations
       
    60 */
       
    61 
       
    62 /* Create a new time structure */
       
    63 NW_Time_Tm_t *NW_Time_Tm_New();
       
    64 
       
    65 /* Free a time structure */
       
    66 void NW_Time_Tm_Delete(NW_Time_Tm_t *time);
       
    67 
       
    68 /* Convert time from NW_Timer_t to NW_Time_Tm_t format */
       
    69 NW_Time_Tm_t *NW_Time_CvtToTimeTm(const NW_Time_t time);
       
    70 
       
    71 /*Convert time from NW_Time_Tm_t to NW_Timer_t format */
       
    72 NW_Time_t NW_Time_CvtFromTimeTm(const NW_Time_Tm_t *time);
       
    73 
       
    74 /* Get UTC (GMT) time in Seconds since Jan 1st, 1970 */
       
    75 NW_Time_t NW_Time_GetTime(void);
       
    76 
       
    77 /* Get free running time in Milliseconds */
       
    78 NW_Uint32 NW_Time_GetTimeMSec(void);
       
    79 
       
    80 
       
    81 
       
    82 #ifdef __cplusplus
       
    83 } /* extern "C" */
       
    84 #endif
       
    85 
       
    86 #endif  /* NWX_TIME_H */