openocd/src/helper
Zachary T Welch 2689f58f2a Overhaul time support API
This patch changes the duration_* API in several ways.  First, it
updates the API to use better names.  Second, string formatting has
been removed from the API (with its associated malloc).  Finally, a
new function added to convert the time into seconds, which can be
used (or formatted) by the caller.  This eliminates hidden calls to
malloc that require associated calls to free().

This patch also removes the useless extern keyword from prototypes,
and it eliminates the duration_t typedef (use 'struct duration').
These API also allows proper error checking, as it is possible for
gettimeofday to fail in certain circumstances.

The consumers have all been chased to use this new API as well, as
there were relatively few cases doing this type of measurement.
In most cases, the code performs additional checks for errors, but
the calling code looks much cleaner in every case.
2009-11-09 01:21:50 -08:00
..
bin2char.c bin2char: for win32 set stdin/stdout to binary mode 2009-10-30 11:59:57 +00:00
binarybuffer.c Andreas Fritiofson <andreas.fritiofson@gmail.com> UTF8 fixes 2009-07-17 19:54:25 +00:00
binarybuffer.h Updates to the initial scanchain validation code: 2009-09-26 19:18:42 +00:00
command.c David Brownell <david-b@pacbell.net> Be sure the built-in search paths always go *after* ones provided 2009-08-30 17:27:50 +00:00
command.h Add macro for parsing numeric command arguments. 2009-11-05 17:27:25 -08:00
configuration.c Andreas Fritiofson <andreas.fritiofson@gmail.com> UTF8 fixes 2009-07-17 19:54:25 +00:00
configuration.h David Brownell <david-b@pacbell.net> Be sure the built-in search paths always go *after* ones provided 2009-08-30 17:27:50 +00:00
fileio.c Andreas Fritiofson <andreas.fritiofson@gmail.com> UTF8 fixes 2009-07-17 19:54:25 +00:00
fileio.h Andreas Fritiofson <andreas.fritiofson@gmail.com> UTF8 fixes 2009-07-17 19:54:25 +00:00
ioutil.c Andreas Fritiofson <andreas.fritiofson@gmail.com> UTF8 fixes 2009-07-17 19:54:25 +00:00
jim-eventloop.c Sync with official Jim Tcl repository. 2009-10-19 15:16:42 +02:00
jim-eventloop.h Andreas Fritiofson <andreas.fritiofson@gmail.com> UTF8 fixes 2009-07-17 19:54:25 +00:00
jim.c Sync with official Jim Tcl repository. 2009-10-19 15:16:42 +02:00
jim.h Sync with official Jim Tcl repository. 2009-10-19 15:16:42 +02:00
log.c Improve debug_level command argument parsing. 2009-11-05 18:03:18 -08:00
log.h corrective fix for MinGW GNU C99 printf compliance 2009-10-19 09:49:34 -07:00
Makefile.am xscale: better fix for debug_handler.bin 2009-10-16 13:52:40 -07:00
membuf.c Switch to strotk() grr.... 2009-06-27 16:44:35 +00:00
membuf.h Add missing copyright header and fix @page direction in membuf.h. 2009-07-01 19:55:39 +00:00
options.c David Brownell <david-b@pacbell.net> Be sure the built-in search paths always go *after* ones provided 2009-08-30 17:27:50 +00:00
replacements.c safer conversion to HANDLER on MinGW-W64 2009-10-17 22:18:38 -07:00
replacements.h Andreas Fritiofson <andreas.fritiofson@gmail.com> UTF8 fixes 2009-07-17 19:54:25 +00:00
startup.tcl doc updates to match "help" better 2009-10-14 15:18:00 -07:00
system.h remove hacks no longer required to build OpenOCD w/eCos 2009-06-05 06:43:09 +00:00
time_support.c Overhaul time support API 2009-11-09 01:21:50 -08:00
time_support.h Overhaul time support API 2009-11-09 01:21:50 -08:00
types.h Add stringify macros in src/helper/types.h. 2009-11-05 17:20:18 -08:00