]> mj.ucw.cz Git - libucw.git/blobdiff - lib/profile.c
Updated all users of the timer interface to pass an explicit timer context.
[libucw.git] / lib / profile.c
index f78eae746af4fbe5c4bbf7edc9e338a8cdde9c75..feed51f5567a728636ae51ac013e2b584df75c6a 100644 (file)
@@ -1,7 +1,10 @@
 /*
- *     Sherlock Library -- Poor Man's Profiler
+ *     UCW 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++;
        }
     }
 }