time.h
Go to the documentation of this file.
1
9/*
10 * The contents of this file are subject to the Mozilla Public License
11 * Version 1.0 (the "License"); you may not use this file except in
12 * compliance with the License. You may obtain a copy of the License
13 * at http://www.mozilla.org/MPL/
14 *
15 * Software distributed under the License is distributed on an "AS IS"
16 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
17 * the License for the specific language governing rights and
18 * limitations under the License.
19 *
20 * The Original Code is legOS code, released October 17, 1999.
21 *
22 * The Initial Developer of the Original Code is Markus L. Noga.
23 * Portions created by Markus L. Noga are Copyright (C) 1999
24 * Markus L. Noga. All Rights Reserved.
25 *
26 * Contributor(s): Markus L. Noga <markus@noga.de>
27 */
28
29#ifndef __time_h__
30#define __time_h__
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
36#include <config.h>
37
38#ifdef CONF_TIME
39
41//
42// Definitions
43//
45
47
50typedef unsigned long time_t;
51
52//
53// time & related stuff
54//
55
57#define TICK_IN_MS 1
59#define TICKS_PER_SEC 1000
60
61#define SECS_TO_TICKS(a) ((a)*TICKS_PER_SEC)
62#define MSECS_TO_TICKS(a) ((a)/TICK_IN_MS)
63
65//
66// Variables
67//
69
70//extern volatile time_t sys_time; //!< current system time
71// use get_system_up_time() instead of accessing sys_time directly.
73
74#endif // CONF_TIME
75
76#ifdef __cplusplus
77}
78#endif
79
80#endif
time_t get_system_up_time(void)
unsigned long time_t
time type
Definition: time.h:50

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

Generated for brickOS C++ by doxygen 1.9.4