UDK 3.2.7 C/C++ API Reference
osl/time.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
00002 /*************************************************************************
00003  *
00004  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
00005  *
00006  * Copyright 2000, 2010 Oracle and/or its affiliates.
00007  *
00008  * OpenOffice.org - a multi-platform office productivity suite
00009  *
00010  * This file is part of OpenOffice.org.
00011  *
00012  * OpenOffice.org is free software: you can redistribute it and/or modify
00013  * it under the terms of the GNU Lesser General Public License version 3
00014  * only, as published by the Free Software Foundation.
00015  *
00016  * OpenOffice.org is distributed in the hope that it will be useful,
00017  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  * GNU Lesser General Public License version 3 for more details
00020  * (a copy is included in the LICENSE file that accompanied this code).
00021  *
00022  * You should have received a copy of the GNU Lesser General Public License
00023  * version 3 along with OpenOffice.org.  If not, see
00024  * <http://www.openoffice.org/license.html>
00025  * for a copy of the LGPLv3 License.
00026  *
00027  ************************************************************************/
00028 
00029 #ifndef _OSL_TIME_H_
00030 #define _OSL_TIME_H_
00031 
00032 #include <sal/types.h>
00033 
00034 #ifdef __cplusplus
00035 extern "C" {
00036 #endif
00037 
00038 /****************************************************************************/
00039 /* TimeValue                                                                */
00040 /****************************************************************************/
00041 
00042 #ifdef SAL_W32
00043 #   pragma pack(push, 8)
00044 #endif
00045 
00046 /* Time since Jan-01-1970 */
00047 
00048 typedef struct {
00049     sal_uInt32 Seconds;
00050     sal_uInt32 Nanosec;
00051 } TimeValue;
00052 
00053 #if defined(SAL_W32)
00054 #   pragma pack(pop)
00055 #endif
00056 
00057 
00058 /****************************************************************************/
00059 /* oslDateTime */
00060 /****************************************************************************/
00061 
00062 typedef struct _oslDateTime
00063 {
00064     /*----------------------------------------------------------------------*/
00067     sal_uInt32 NanoSeconds;
00068 
00071     sal_uInt16 Seconds;
00072 
00073     /*----------------------------------------------------------------------*/
00076     sal_uInt16 Minutes;
00077 
00078     /*----------------------------------------------------------------------*/
00081     sal_uInt16 Hours;
00082 
00083     /*----------------------------------------------------------------------*/
00086     sal_uInt16 Day;
00087 
00088     /*----------------------------------------------------------------------*/
00091     sal_uInt16 DayOfWeek;
00092 
00093     /*----------------------------------------------------------------------*/
00096     sal_uInt16 Month;
00097 
00098     /*----------------------------------------------------------------------*/
00101     sal_uInt16 Year;
00102 
00103 } oslDateTime;
00104 
00105 
00109 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_getSystemTime(
00110         TimeValue* pTimeVal );
00111 
00112 
00119 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_getDateTimeFromTimeValue(
00120         TimeValue* pTimeVal, oslDateTime* pDateTime );
00121 
00122 
00129 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_getTimeValueFromDateTime(
00130         oslDateTime* pDateTime, TimeValue* pTimeVal );
00131 
00132 
00139 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_getLocalTimeFromSystemTime(
00140         TimeValue* pSystemTimeVal, TimeValue* pLocalTimeVal );
00141 
00142 
00149 SAL_DLLPUBLIC sal_Bool SAL_CALL osl_getSystemTimeFromLocalTime(
00150         TimeValue* pLocalTimeVal, TimeValue* pSystemTimeVal );
00151 
00152 
00157 SAL_DLLPUBLIC sal_uInt32 SAL_CALL osl_getGlobalTimer(void);
00158 
00159 #ifdef __cplusplus
00160 }
00161 #endif
00162 
00163 #endif  /* _OSL_TIME_H_ */
00164 
00165 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines