diff --git a/core/lib/energest.c b/core/lib/energest.c index 8c1754ed9..bb3ec70c7 100644 --- a/core/lib/energest.c +++ b/core/lib/energest.c @@ -28,12 +28,12 @@ * * This file is part of the Contiki operating system. * - * $Id: energest.c,v 1.2 2007/05/15 07:54:03 adamdunkels Exp $ + * $Id: energest.c,v 1.3 2007/05/22 20:52:20 adamdunkels Exp $ */ /** * \file - * A brief description of what this file is. + * Implementation of the energy estimation module * \author * Adam Dunkels */ @@ -43,6 +43,7 @@ #if ENERGEST_CONF_ON +int energest_total_count; energest_t energest_total_time[ENERGEST_TYPE_MAX]; energest_t energest_current_time[ENERGEST_TYPE_MAX]; @@ -62,7 +63,14 @@ energest_type_time(int type) return energest_total_time[type].current; } /*---------------------------------------------------------------------------*/ +void +energest_type_set(int type, unsigned long val) +{ + energest_total_time[type].current = val; +} +/*---------------------------------------------------------------------------*/ #else /* ENERGEST_CONF_ON */ +void energest_type_set(int type, unsigned long val) {} void energest_init(void) {} unsigned long energest_type_time(int type) { return 0; } #endif /* ENERGEST_CONF_ON */