KM3NeT CLB  2.0
KM3NeT CLB v2 Embedded Software
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
profiler.h
1 /*
2  * KM3NeT CLB v2 Firmware
3  * ----------------------
4  *
5  * Copyright 2012-2015 KM3NeT Collaboration
6  *
7  * All Rights Reserved.
8  *
9  *
10  * File : profiler.h
11  * Created : 4 mrt. 2015
12  * Author : Vincent van Beveren
13  */
14 #ifndef DBG_PROFILER_H_
15 #define DBG_PROFILER_H_
16 
17 #include <drv/wb/ticks.h>
18 
19 typedef struct {
20  const char * name;
21  uint32_t time;
22  uint32_t count;
23  uint32_t t;
24 } ProfEntry;
25 
26 
27 static inline void profStart(ProfEntry * entry) {
28  entry->t = ticks();
29 }
30 void profStop(ProfEntry * entry);
31 
32 
33 #endif /* DBG_PROFILER_H_ */
White Rabbit simple timer &#39;Ticks&#39; driver.
Definition: profiler.h:19
static uint32_t ticks()
Nr of ticks since device start up.
Definition: ticks.h:37