mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-29 07:57:20 +02:00
Display duration of each activity session
This commit is contained in:
parent
745d24e124
commit
c0fbfcc58c
4 changed files with 15 additions and 4 deletions
|
@ -381,7 +381,7 @@ int CmdInfo::execute (std::string& output)
|
|||
std::string previous;
|
||||
std::string current;
|
||||
unsigned int i = 0;
|
||||
long total_time = 0;
|
||||
long total_time = 0, last_timestamp = 0;
|
||||
while (i < undo.size ())
|
||||
{
|
||||
when = undo[i++];
|
||||
|
@ -403,7 +403,7 @@ int CmdInfo::execute (std::string& output)
|
|||
|
||||
Task before (previous.substr (4));
|
||||
Task after (current.substr (4));
|
||||
journal.set (row, 1, taskInfoDifferences (before, after, dateformat));
|
||||
journal.set (row, 1, taskInfoDifferences (before, after, dateformat, last_timestamp, timestamp.toEpoch()));
|
||||
|
||||
// calculate the total active time
|
||||
if (before.get ("start") == ""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue