Table of Contents

Name

fasttime_create_context, fasttime_destroy_context, fasttime_get_default_context - create or destroy a context for the fasttime library

Synopsis

#include <fasttime.h>

fasttime_context_t fasttime_create_context();

void fasttime_destroy_context(fasttime_context_t context);

fasttime_context_t fasttime_get_default_context();

Description

If you do not wish to use the default context (for example, you want to use more than one method at a time) you must create a context for use with fasttime functions.

Internally, these functions do nothing more than malloc and free the required data, so use them as you would any memory allocation.

fasttime_get_default_context returns a handle to the default static context. This should not be destroyed.

Contexts created with these functions need to be initialised before they can be used (see fasttime_init_context).

Thread Safety

fasttime_create_context is thread-safe if malloc(3) is thread-safe.

fasttime_destroy_context should only be called once per context, and is otherwise thread-safe if free(3) is thread-safe.

fasttime_get_default_context is thread-safe.

Author

Alex Holkner (alex@partiallydisassembled.net)

Homepage

http://fasttime.sourceforge.net/

See Also

fasttime_init_context(3)


Table of Contents