X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Ftimer.c;h=86a2d1984cd06ad5dec760ba572def3978ea8051;hb=8ab69f51fccccbcae521bd7f7e3ae27146fd1217;hp=c355d3b7de1bd5d54e5fac5290bf4dad2624b047;hpb=4ecd6b5eabaf81c764a8ecf4ba8bacb7452a26d1;p=libucw.git diff --git a/lib/timer.c b/lib/timer.c index c355d3b7..86a2d198 100644 --- a/lib/timer.c +++ b/lib/timer.c @@ -1,15 +1,18 @@ /* - * Sherlock Library -- Prime Number Tests + * 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.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; +}