]> mj.ucw.cz Git - libucw.git/blobdiff - lib/profile.c
Added xstrdup() and new logging functions.
[libucw.git] / lib / profile.c
index f78eae746af4fbe5c4bbf7edc9e338a8cdde9c75..af84b3ea303f94647fd62a66e31cb8fa97227d47 100644 (file)
@@ -2,6 +2,9 @@
  *     Sherlock Library -- Poor Man's Profiler
  *
  *     (c) 2001 Martin Mares <mj@ucw.cz>
+ *
+ *     This software may be freely distributed and used according to the terms
+ *     of the GNU Lesser General Public License.
  */
 
 #include "lib/lib.h"
@@ -36,12 +39,12 @@ prof_tod_switch(struct prof_tod *o, struct prof_tod *n)
       if (o->usec < 0)
        {
          o->usec += 1000000;
-         o->sec++;
+         o->sec--;
        }
       else while (o->usec >= 1000000)
        {
          o->usec -= 1000000;
-         o->sec--;
+         o->sec++;
        }
     }
 }