X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Fprofile.c;h=feed51f5567a728636ae51ac013e2b584df75c6a;hb=e34560a76a7af3fb428604e4da3cd14cfd1bf454;hp=f78eae746af4fbe5c4bbf7edc9e338a8cdde9c75;hpb=3a14e6ecdc65a439df3291a37ca7965cd150211a;p=libucw.git diff --git a/lib/profile.c b/lib/profile.c index f78eae74..feed51f5 100644 --- a/lib/profile.c +++ b/lib/profile.c @@ -1,7 +1,10 @@ /* - * Sherlock Library -- Poor Man's Profiler + * UCW Library -- Poor Man's Profiler * * (c) 2001 Martin Mares + * + * 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++; } } }