1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 04:52:59 +01:00

proper inttype runtime, declare to import

define runtime long as hwtimer_now() uses long
import hwtimer.h instead of declaring hwtimer_now()
This commit is contained in:
Ludwig Ortmann 2013-11-16 19:26:02 +01:00
parent a0132f7595
commit ffd8088d1d
2 changed files with 9 additions and 5 deletions

View File

@ -90,7 +90,7 @@ typedef struct {
unsigned int laststart; /*< Time stamp of the last time this thread was
scheduled to run */
unsigned int schedules; /*< How often the thread was scheduled to run */
unsigned int runtime; /*< The total runtime of this thread */
unsigned long runtime; /*< The total runtime of this thread */
} schedstat;
/**

View File

@ -7,6 +7,8 @@
* Public License. See the file LICENSE in the top level directory for more
* details.
*
* TODO: setup dependency from SCHEDSTATISTICS to MODULE_HWTIMER
*
* @ingroup kernel
* @{
* @file
@ -21,6 +23,10 @@
#include <clist.h>
#include <bitarithm.h>
#if SCHEDSTATISTICS
#include "hwtimer.h"
#endif
#define ENABLE_DEBUG (0)
#include <debug.h>
@ -87,10 +93,8 @@ void sched_run()
}
#if SCHEDSTATISTICS
/* TODO: setup dependency from SCHEDSTATISTICS to MODULE_HWTIMER */
extern unsigned long hwtimer_now(void);
unsigned int time = hwtimer_now();
#ifdef SCHEDSTATISTICS
unsigned long time = hwtimer_now();
if (my_active_thread && (pidlist[my_active_thread->pid].laststart)) {
pidlist[my_active_thread->pid].runtime += time - pidlist[my_active_thread->pid].laststart;