#include <time.h>
#include <gtk/gtk.h>

/* choose an update timeout based on the accuracy chosen by user */
int charge_rate ();

/* commence charging to an entry */
void charge_begin(time_t now);

/* complete charging to an entry */
void charge_end(time_t now);

/* update the current entry by stopping and starting charging */
void charge_update();

/* called frequently to update the display */
gint charge_timeout (gpointer data);

/* start running the timeout process */
void charge_schedule();

/* stop running the timeout process */
void charge_deschedule();

/* if the charging timeout is active, reschedule it */
void charge_reschedule();
