Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Tsss... :)
[simgrid.git] / include / gras / chrono.h
1 /*      $Id$     */
2
3 /* chrono.h - timer macros for GRAS                                         */
4
5 /* Copyright (c) 2005 Martin Quinson, Arnaud Legrand. All rights reserved.  */
6
7 /* This program is free software; you can redistribute it and/or modify it
8  * under the terms of the license (GNU LGPL) which comes with this package. */
9
10
11 #ifndef GRAS_CHRONO_H
12 #define GRAS_CHRONO_H
13
14 #include "xbt/misc.h"
15
16 BEGIN_DECL()
17
18 void gras_bench_always_begin(const char *location);
19 void gras_bench_always_end(void);
20
21 /** \brief Start benchmark this part of the code
22     \hideinitializer */
23 #define GRAS_BENCH_ALWAYS_BEGIN gras_bench_always_begin(__FILE__ __LINE__ __FUNCTION__)
24 /** \brief Stop benchmark this part of the code
25     \hideinitializer */
26 #define GRAS_BENCH_ALWAYS_END gras_bench_always_end()
27
28 /** \brief Start benchmark this part of the code if it has never been benchmarked before
29     \hideinitializer */
30 #define GRAS_BENCH_ONCE_BEGIN
31 /** \brief Stop benchmarking this part of the code
32     \hideinitializer */
33 #define GRAS_BENCH_ONCE_END
34
35 END_DECL()
36
37 #endif /* GRAS_CHRONO_H */