X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Ftimer.c;h=86a2d1984cd06ad5dec760ba572def3978ea8051;hb=62eda8640605c19ecd817e274e75717022349732;hp=802945187c4b2fbd0582924117fa2e00fbea13b6;hpb=5b53087fa5a07ff89d34cf3bf3bc1b28809f05c2;p=libucw.git diff --git a/lib/timer.c b/lib/timer.c index 80294518..86a2d198 100644 --- a/lib/timer.c +++ b/lib/timer.c @@ -1,15 +1,18 @@ /* - * Sherlock Library -- Execution Timing + * UCW Library -- Execution Timing * - * (c) 1997 Martin Mares, + * (c) 1997 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" + #include #include #include -#include "lib/lib.h" - static struct timeval last_tv; uns @@ -41,3 +44,9 @@ init_timer(void) { gettimeofday(&last_tv, NULL); } + +void +get_last_timeval(struct timeval *tv) +{ + *tv = last_tv; +}