<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -560,14 +560,14 @@ while [ &quot;${source_no}&quot; -lt &quot;${no_sources}&quot; ]; do
       fi
    fi
 
-   # Calculation
+   #
+   # Time calculation
+   #
    end_s=&quot;$(${SDATE})&quot;
-
    full_seconds=&quot;$((${end_s} - ${begin_s}))&quot;
    hours=&quot;$((${full_seconds} / 3600))&quot;
-   seconds=&quot;$((${full_seconds} - (${hours} * 3600)))&quot;
-   minutes=&quot;$((${seconds} / 60))&quot;
-   seconds=&quot;$((${seconds} - (${minutes} * 60)))&quot;
+   minutes=&quot;$(((${full_seconds} % 3600) / 60))&quot;
+   seconds=&quot;$((${full_seconds} % 60))&quot;
 
    _techo &quot;Backup lasted: ${hours}:${minutes}:${seconds} (h:m:s)&quot;
 ) | add_name</diff>
      <filename>ccollect.sh</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>545158b56fc6e461b8dc0b9513b032e3c0eb7bc7</id>
    </parent>
  </parents>
  <author>
    <name>Nico Schottelius</name>
    <email>nico@ikn.schottelius.org</email>
  </author>
  <url>http://github.com/telmich/ccollect/commit/f630bef3b5a549ae5092e24f7f00576ac95af8cd</url>
  <id>f630bef3b5a549ae5092e24f7f00576ac95af8cd</id>
  <committed-date>2009-11-01T07:15:00-08:00</committed-date>
  <authored-date>2009-11-01T07:15:00-08:00</authored-date>
  <message>Finally simplify the time calculations!

According to

   http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap01.html

a shell must be able to do modulus (=remainder). Zsh, bash and dash
confirm this and thus I can save another line and get rid of a very
ugly one.

Signed-off-by: Nico Schottelius &lt;nico@ikn.schottelius.org&gt;</message>
  <tree>01521f2baa7c6f4e459eddc77231f176b23b9308</tree>
  <committer>
    <name>Nico Schottelius</name>
    <email>nico@ikn.schottelius.org</email>
  </committer>
</commit>
