YAKL
YAKL_timers.h
Go to the documentation of this file.
1 
7 #pragma once
8 // Included by YAKL.h
9 // Inside the yakl namespace
10 
11 #include "YAKL_Toney.h"
12 
14 namespace yakl {
15 
17  inline void timer_init ( ) { get_yakl_instance().timer_init_func ( ); }
18 
20  inline void timer_finalize( ) { get_yakl_instance().timer_finalize_func( ); }
21 
23  inline void timer_start (char const *lab) { get_yakl_instance().timer_start_func (lab); }
24 
26  inline void timer_stop (char const *lab) { get_yakl_instance().timer_stop_func (lab); }
27 
28 
29 
31  inline void set_timer_init ( std::function<void ()> func ) { get_yakl_instance().timer_init_func = func; }
32 
34  inline void set_timer_finalize( std::function<void ()> func ) { get_yakl_instance().timer_finalize_func = func; }
35 
37  inline void set_timer_start ( std::function<void (char const *)> func ) { get_yakl_instance().timer_start_func = func; }
38 
40  inline void set_timer_stop ( std::function<void (char const *)> func ) { get_yakl_instance().timer_stop_func = func; }
41 }
43 
yakl::timer_stop
void timer_stop(char const *lab)
Stop a timer with the given string label. NOTE: Timers must be perfectly nested.
Definition: YAKL_timers.h:26
yakl::set_timer_finalize
void set_timer_finalize(std::function< void()> func)
Override YAKL's default timer finalization routine.
Definition: YAKL_timers.h:34
yakl::set_timer_init
void set_timer_init(std::function< void()> func)
Override YAKL's default timer initialization routine.
Definition: YAKL_timers.h:31
yakl::timer_finalize
void timer_finalize()
Finalize the YAKL timers.
Definition: YAKL_timers.h:20
__YAKL_NAMESPACE_WRAPPER_END__
#define __YAKL_NAMESPACE_WRAPPER_END__
Definition: YAKL.h:20
yakl::set_timer_stop
void set_timer_stop(std::function< void(char const *)> func)
Override YAKL's default routine to stop an individual timer.
Definition: YAKL_timers.h:40
yakl::set_timer_start
void set_timer_start(std::function< void(char const *)> func)
Override YAKL's default routine to start an individual timer.
Definition: YAKL_timers.h:37
__YAKL_NAMESPACE_WRAPPER_BEGIN__
#define __YAKL_NAMESPACE_WRAPPER_BEGIN__
Definition: YAKL.h:19
yakl
yakl::timer_start
void timer_start(char const *lab)
Start a timer with the given string label. NOTE: Timers must be perfectly nested.
Definition: YAKL_timers.h:23
yakl::timer_init
void timer_init()
Initialize the YAKL timers.
Definition: YAKL_timers.h:17