Main Page | Data Structures | File List | Data Fields | Globals | Related Pages

include/time.h

Go to the documentation of this file.
00001 
00009 /*
00010  *  The contents of this file are subject to the Mozilla Public License
00011  *  Version 1.0 (the "License"); you may not use this file except in
00012  *  compliance with the License. You may obtain a copy of the License
00013  *  at http://www.mozilla.org/MPL/
00014  *
00015  *  Software distributed under the License is distributed on an "AS IS"
00016  *  basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
00017  *  the License for the specific language governing rights and
00018  *  limitations under the License.
00019  *
00020  *  The Original Code is legOS code, released October 17, 1999.
00021  *
00022  *  The Initial Developer of the Original Code is Markus L. Noga.
00023  *  Portions created by Markus L. Noga are Copyright (C) 1999
00024  *  Markus L. Noga. All Rights Reserved.
00025  *
00026  *  Contributor(s): Markus L. Noga <markus@noga.de>
00027  */
00028 
00029 #ifndef __time_h__
00030 #define __time_h__
00031 
00032 #ifdef  __cplusplus
00033 extern "C" {
00034 #endif
00035 
00036 #include <config.h>
00037 
00038 #ifdef CONF_TIME
00039 
00041 //
00042 // Definitions
00043 //
00045 
00047 
00050 typedef unsigned long time_t;
00051 
00052 //
00053 // time & related stuff
00054 //
00055 
00057 #define TICK_IN_MS      1
00058 
00059 #define TICKS_PER_SEC   1000
00060 
00061 #define SECS_TO_TICKS(a)  ((a)*TICKS_PER_SEC)   
00062 #define MSECS_TO_TICKS(a) ((a)/TICK_IN_MS)              
00063 
00064 
00065 //
00066 // Variables
00067 //
00069 
00070 //extern volatile time_t sys_time;      //!< current system time
00071 // use get_system_up_time() instead of accessing sys_time directly.
00072 time_t get_system_up_time(void);
00073 
00074 #endif // CONF_TIME
00075 
00076 #ifdef  __cplusplus
00077 }
00078 #endif
00079 
00080 #endif

brickOS is released under the Mozilla Public License.
Original code copyright 1998-2002 by the authors.

Generated on Mon Feb 16 21:01:52 2004 for brickOS C by doxygen 1.3.5