litl  0.1.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Typedefs | Functions | Variables
litl_timer.h File Reference

litl_timer Provides a set of functions for measuring time More...

#include "litl_types.h"

Go to the source code of this file.

Typedefs

typedef litl_time_t(* litl_timing_method_t )()
 A callback function that returns the current time in ns. It can be either a pointer to one of the timing functions provided by LiTL or a user-defined function. More...
 

Functions

void litl_time_initialize ()
 Initializes the timing mechanism. More...
 
int litl_set_timing_method (litl_timing_method_t callback)
 Selects the timing function to use. More...
 
litl_time_t litl_get_time_monotonic_raw ()
 Uses clock_gettime(CLOCK_MONOTONIC_RAW) More...
 
litl_time_t litl_get_time_monotonic ()
 Uses clock_gettime(CLOCK_MONOTONIC) More...
 
litl_time_t litl_get_time_realtime ()
 Uses clock_gettime(CLOCK_REALTIME) More...
 
litl_time_t litl_get_time_process_cputime ()
 Uses clock_gettime(CLOCK_PROCESS_CPUTIME) More...
 
litl_time_t litl_get_time_thread_cputime ()
 Uses clock_gettime(CLOCK_THREAD_CPUTIME) More...
 
litl_time_t litl_get_time_ticks ()
 Uses CPU-specific register (for instance, rdtsc for X86* processors) More...
 

Variables

litl_timing_method_t litl_get_time
 Calls the selected timing method and get the current time in ns. More...
 

Detailed Description

litl_timer Provides a set of functions for measuring time

Authors
Developers are :
Roman Iakymchuk – roman.nosp@m..iak.nosp@m.ymchu.nosp@m.k@te.nosp@m.lecom.nosp@m.-sud.nosp@m.paris.nosp@m..eu
Francois Trahay – franc.nosp@m.ois..nosp@m.traha.nosp@m.y@te.nosp@m.lecom.nosp@m.-sud.nosp@m.paris.nosp@m..eu

Definition in file litl_timer.h.