00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifdef HAVE_CONFIG_H
00018 #include "config.h"
00019 #endif
00020
00021 #ifndef RUN_TIME_INFO_H
00022 #define RUN_TIME_INFO_H
00023
00024 #include <lyric/Chronometer.hpp>
00025 #include <sys/times.h>
00026
00027 namespace DALT_Client {
00028
00032 class RunTimeInfo
00033 {
00034 private:
00036 Chronometer* chronometer;
00038 clock_t utime_start,stime_start;
00040 tms times_struct;
00042 bool is_resumed;
00043
00044 public:
00046 unsigned int cycles;
00048 unsigned long int last_cycle_time;
00051 unsigned long int average_cycle_time;
00053 unsigned long int thread_last_cycle_time;
00055 unsigned long int thread_average_cycle_time;
00056
00057
00059 RunTimeInfo();
00061 ~RunTimeInfo();
00062
00066 void newCycle();
00068 void endCycle();
00070 void resume();
00071 };
00072
00073 }
00074
00075 #endif