]> mj.ucw.cz Git - libucw.git/commit
Replaced the old timing functions by something more useful.
authorMartin Mares <mj@ucw.cz>
Sat, 17 Feb 2007 21:02:21 +0000 (22:02 +0100)
committerMartin Mares <mj@ucw.cz>
Sat, 17 Feb 2007 21:02:21 +0000 (22:02 +0100)
commite21ac9b1bda89eea1b8ae8402a4edc3afb2de8d8
tree003b2cbd8bb8f79eea96e9428130d2ea5c450642
parente7fcd506163c155afa5313fb28ee7e931018117f
Replaced the old timing functions by something more useful.

get_timer() using global state was making it unusable in many cases,
especially in library routines. I decided to make the callers specify
an explicit context (a timer) instead and re-used the idea of millisecond
timestamps from mainloop.c.

I've moved timestamp_t to config.h, introduced global get_timestamp()
and replaced the timer functions by ones with an explicit timestamp_t *
argument.
lib/config.h
lib/lib.h
lib/mainloop.h
lib/timer.c