mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-14 20:30:52 +08:00
Added get_cyclecount() method.
This commit is contained in:
29
rtemsbsd/src/rtems-bsd-cyclecount.c
Normal file
29
rtemsbsd/src/rtems-bsd-cyclecount.c
Normal file
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* @ingroup rtems_bsd_rtems
|
||||
*
|
||||
* @brief TODO.
|
||||
*/
|
||||
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rtems.com/license/LICENSE.
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <rtems.h>
|
||||
|
||||
u_int64_t
|
||||
get_cyclecount(void)
|
||||
{
|
||||
u_int64_t value;
|
||||
value = rtems_clock_get_ticks_since_boot();
|
||||
return value;
|
||||
}
|
||||
|
Reference in New Issue
Block a user