int i;
struct snapshot_list sl;
struct snapshot *s;
+ int64_t now = get_current_time();
dss_get_snapshot_list(&sl);
FOR_EACH_SNAPSHOT(s, i, &sl) {
- int64_t d = 0;
+ int64_t d;
if (s->flags & SS_COMPLETE)
d = (s->completion_time - s->creation_time) / 60;
- dss_msg("%u\t%s\t%3" PRId64 ":%02" PRId64 "\n", s->interval, s->name, d/60, d%60);
+ else
+ d = (now - s->creation_time) / 60;
+ dss_msg("%u\t%s\t%3" PRId64 ":%02" PRId64 "\n", s->interval,
+ s->name, d / 60, d % 60);
}
free_snapshot_list(&sl);
return 1;