Leo Chen | 3455912 | 2009-08-07 20:01:47 +0100 | [diff] [blame] | 1 | /***************************************************************************** |
| 2 | * Copyright 2004 - 2008 Broadcom Corporation. All rights reserved. |
| 3 | * |
| 4 | * Unless you and Broadcom execute a separate written software license |
| 5 | * agreement governing use of this software, this software is licensed to you |
| 6 | * under the terms of the GNU General Public License version 2, available at |
| 7 | * http://www.broadcom.com/licenses/GPLv2.php (the "GPL"). |
| 8 | * |
| 9 | * Notwithstanding the above, under no circumstances may you combine this |
| 10 | * software in any way with any other Broadcom software provided under a |
| 11 | * license other than the GPL, without Broadcom's express prior written |
| 12 | * consent. |
| 13 | *****************************************************************************/ |
| 14 | |
| 15 | /* |
| 16 | * |
| 17 | ***************************************************************************** |
| 18 | * |
| 19 | * timer.h |
| 20 | * |
| 21 | * PURPOSE: |
| 22 | * |
| 23 | * |
| 24 | * |
| 25 | * NOTES: |
| 26 | * |
| 27 | *****************************************************************************/ |
| 28 | |
| 29 | #if !defined(BCM_LINUX_TIMER_H) |
| 30 | #define BCM_LINUX_TIMER_H |
| 31 | |
| 32 | #if defined(__KERNEL__) |
| 33 | |
| 34 | /* ---- Include Files ---------------------------------------------------- */ |
| 35 | /* ---- Constants and Types ---------------------------------------------- */ |
| 36 | |
| 37 | typedef unsigned int timer_tick_count_t; |
| 38 | typedef unsigned int timer_tick_rate_t; |
| 39 | typedef unsigned int timer_msec_t; |
| 40 | |
| 41 | /* ---- Variable Externs ------------------------------------------------- */ |
| 42 | /* ---- Function Prototypes ---------------------------------------------- */ |
| 43 | |
| 44 | /**************************************************************************** |
| 45 | * |
| 46 | * timer_get_tick_count |
| 47 | * |
| 48 | * |
| 49 | ***************************************************************************/ |
| 50 | timer_tick_count_t timer_get_tick_count(void); |
| 51 | |
| 52 | /**************************************************************************** |
| 53 | * |
| 54 | * timer_get_tick_rate |
| 55 | * |
| 56 | * |
| 57 | ***************************************************************************/ |
| 58 | timer_tick_rate_t timer_get_tick_rate(void); |
| 59 | |
| 60 | /**************************************************************************** |
| 61 | * |
| 62 | * timer_get_msec |
| 63 | * |
| 64 | * |
| 65 | ***************************************************************************/ |
| 66 | timer_msec_t timer_get_msec(void); |
| 67 | |
| 68 | /**************************************************************************** |
| 69 | * |
| 70 | * timer_ticks_to_msec |
| 71 | * |
| 72 | * |
| 73 | ***************************************************************************/ |
| 74 | timer_msec_t timer_ticks_to_msec(timer_tick_count_t ticks); |
| 75 | |
| 76 | #endif /* __KERNEL__ */ |
| 77 | #endif /* BCM_LINUX_TIMER_H */ |