|
|
1.1 root 1: /******************************************************************************
2: * Copyright (c) 2004, 2008 IBM Corporation
3: * All rights reserved.
4: * This program and the accompanying materials
5: * are made available under the terms of the BSD License
6: * which accompanies this distribution, and is available at
7: * http://www.opensource.org/licenses/bsd-license.php
8: *
9: * Contributors:
10: * IBM Corporation - initial implementation
11: *****************************************************************************/
12:
13:
14: #ifndef _TIME_H_
15: #define _TIME_H_
16:
17: typedef unsigned long clock_t;
18: typedef unsigned long time_t;
19:
20: time_t time(time_t *);
21:
22: extern unsigned long tb_freq;
23:
24: /* setup the timer to start counting from the given parameter */
25: void set_timer(int);
26: /* read the current value from the decrementer */
1.1.1.2 ! root 27: int get_timer(void);
1.1 root 28: /* get the number of ticks for which the decrementer needs 1 second */
1.1.1.2 ! root 29: int get_sec_ticks(void);
1.1 root 30: /* get the number of ticks for which the decrementer needs 1 millisecond */
1.1.1.2 ! root 31: int get_msec_ticks(void);
1.1 root 32:
33: #define TICKS_MSEC get_msec_ticks()
34: #define TICKS_SEC get_sec_ticks()
35:
36: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.