... | ... |
@@ -8,48 +8,49 @@ |
8 | 8 |
* |
9 | 9 |
* Permission to use, modify and distribute this software is granted |
10 | 10 |
* provided that this copyright notice appears in all copies. For |
11 | 11 |
* precise terms see the accompanying LICENSE file. |
12 | 12 |
* |
13 | 13 |
* This software is provided "AS IS" with no warranty of any kind, |
14 | 14 |
* express or implied, and with no claim as to its suitability for any |
15 | 15 |
* purpose. |
16 | 16 |
* |
17 | 17 |
*/ |
18 | 18 |
|
19 | 19 |
#ifndef LEMON_TIME_MEASURE_H |
20 | 20 |
#define LEMON_TIME_MEASURE_H |
21 | 21 |
|
22 | 22 |
///\ingroup timecount |
23 | 23 |
///\file |
24 | 24 |
///\brief Tools for measuring cpu usage |
25 | 25 |
|
26 | 26 |
#ifdef WIN32 |
27 | 27 |
#define WIN32_LEAN_AND_MEAN |
28 | 28 |
#define NOMINMAX |
29 | 29 |
#include <windows.h> |
30 | 30 |
#include <cmath> |
31 | 31 |
#else |
32 |
#include <unistd.h> |
|
32 | 33 |
#include <sys/times.h> |
33 | 34 |
#include <sys/time.h> |
34 | 35 |
#endif |
35 | 36 |
|
36 | 37 |
#include <string> |
37 | 38 |
#include <fstream> |
38 | 39 |
#include <iostream> |
39 | 40 |
|
40 | 41 |
namespace lemon { |
41 | 42 |
|
42 | 43 |
/// \addtogroup timecount |
43 | 44 |
/// @{ |
44 | 45 |
|
45 | 46 |
/// A class to store (cpu)time instances. |
46 | 47 |
|
47 | 48 |
/// This class stores five time values. |
48 | 49 |
/// - a real time |
49 | 50 |
/// - a user cpu time |
50 | 51 |
/// - a system cpu time |
51 | 52 |
/// - a user cpu time of children |
52 | 53 |
/// - a system cpu time of children |
53 | 54 |
/// |
54 | 55 |
/// TimeStamp's can be added to or substracted from each other and |
55 | 56 |
/// they can be pushed to a stream. |
0 comments (0 inline)