Go to the first, previous, next, last section, table of contents.
This component is used to record events and times with a lower time
and space overhead than the `L_buffer.h' component. Instead
of using a `printf' style string we simply record the time
and a pointer to a string identifying the event in a circular buffer.
Note 0: the string arguments should not be modified after
a call since we record pointers to the strings rather
than the strings themselves.
Note 1: there is no printf style formatting, e.g.
`%d' in this package.
- Type: struct L_TIMES
-
Used to define buffers, it is similar to `FILE*' type in
`stdio.h'. To create an instance use `L_times_create'.
- Function: L_TIMES* L_times_create (int size)
-
- Function: L_TIMES* L_times_delete (L_BUFFER *b)
-
These are used to create or delete a buffer which can contain size
messages.
- Function: void L_times_wraparound (L_TIMES *b, int w)
-
A buffer created by `L_times_create' is set up so that the new
messages will overwrite the oldest messages in the buffer. If you wish
to disable this overwriting, e.g. to keep the first few messages
messages you could use `L_times_wraparound(b,0)'.
- Function: void L_times_add (L_BUFFER *b, char *m, NANA_TIME t)
-
Add an event identified by message m at time t to b.
The type NANA_TIME defaults to `double'.
- Function: void L_times_dump (L_TIMES *b, FILE *fd)
-
Dump the contents of the buffer out.
- Function: void L_times_clear (L_TIMES *b)
-
Clear all the messages from b.
Go to the first, previous, next, last section, table of contents.