added timetable aggregate reset function

This commit is contained in:
fros4943 2008-03-13 14:27:34 +00:00
parent 79cb912f7c
commit 7fcb9554f4
2 changed files with 14 additions and 2 deletions

View File

@ -28,7 +28,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: timetable-aggregate.c,v 1.1 2008/01/17 12:19:26 adamdunkels Exp $
* $Id: timetable-aggregate.c,v 1.2 2008/03/13 14:27:34 fros4943 Exp $
*/
/**
@ -115,6 +115,16 @@ timetable_aggregate_print_detailed(struct timetable_aggregate *a)
}
/*---------------------------------------------------------------------------*/
void
timetable_aggregate_reset(struct timetable_aggregate *a)
{
int i;
for(i = 0; i < a->ptr; ++i) {
a->entries[i].time = 0;
a->entries[i].episodes = 0;
}
}
/*---------------------------------------------------------------------------*/
void
timetable_aggregate_print_categories(struct timetable_aggregate *a)
{
int i;

View File

@ -28,7 +28,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: timetable-aggregate.h,v 1.1 2008/01/17 12:19:26 adamdunkels Exp $
* $Id: timetable-aggregate.h,v 1.2 2008/03/13 14:27:34 fros4943 Exp $
*/
/**
@ -81,6 +81,8 @@ void timetable_aggregate_print_detailed(struct timetable_aggregate *a);
void timetable_aggregate_print_categories(struct timetable_aggregate *a);
void timetable_aggregate_reset(struct timetable_aggregate *a);
void timetable_aggregate_compute_detailed(struct timetable_aggregate *a,
struct timetable *timetable);
void timetable_aggregate_compute_categories(struct timetable_aggregate *a,