summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'timetracker.c')
-rw-r--r--timetracker.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/timetracker.c b/timetracker.c
index 6b40695..5a3c35c 100644
--- a/timetracker.c
+++ b/timetracker.c
@@ -41,9 +41,9 @@ void print_activities(WINDOW *win)
for (int i = 0; i < n; ++i) {
char name[100][100];
char time[100][8];
- int dur = difftime(activities[i].end, activities[i].start);
+ long dur = difftime(activities[i].end, activities[i].start);
snprintf(name[i], 100, "%-*s", COLS - 7, activities[i].name);
- snprintf(time[i], 8, "%0.1f ", dur / 3600);
+ snprintf(time[i], 8, "%0.1f ", dur / 3600.0f);
items[i] = new_item(name[i], time[i]);
}
items[n] = (ITEM *) NULL;