timer.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. * timer.h
  19. *
  20. * PURPOSE:
  21. *
  22. *
  23. *
  24. * NOTES:
  25. *
  26. *****************************************************************************/
  27. #if !defined(BCM_LINUX_TIMER_H)
  28. #define BCM_LINUX_TIMER_H
  29. #if defined(__KERNEL__)
  30. /* ---- Include Files ---------------------------------------------------- */
  31. /* ---- Constants and Types ---------------------------------------------- */
  32. typedef unsigned int timer_tick_count_t;
  33. typedef unsigned int timer_tick_rate_t;
  34. typedef unsigned int timer_msec_t;
  35. /* ---- Variable Externs ------------------------------------------------- */
  36. /* ---- Function Prototypes ---------------------------------------------- */
  37. /****************************************************************************
  38. *
  39. * timer_get_tick_count
  40. *
  41. *
  42. ***************************************************************************/
  43. timer_tick_count_t timer_get_tick_count(void);
  44. /****************************************************************************
  45. *
  46. * timer_get_tick_rate
  47. *
  48. *
  49. ***************************************************************************/
  50. timer_tick_rate_t timer_get_tick_rate(void);
  51. /****************************************************************************
  52. *
  53. * timer_get_msec
  54. *
  55. *
  56. ***************************************************************************/
  57. timer_msec_t timer_get_msec(void);
  58. /****************************************************************************
  59. *
  60. * timer_ticks_to_msec
  61. *
  62. *
  63. ***************************************************************************/
  64. timer_msec_t timer_ticks_to_msec(timer_tick_count_t ticks);
  65. #endif /* __KERNEL__ */
  66. #endif /* BCM_LINUX_TIMER_H */