FlyoDoc_2011 Pisa 2011 by GmP --- 011
|
00001 /*************************************************************************** 00002 tempo.h - description 00003 ------------------- 00004 begin : Sat May 26 2001 00005 copyright : (C) 2001 by Giuseppe Pierazzini 00006 email : peppe@unipi.it 00007 ***************************************************************************/ 00008 00009 #ifndef TEMPO_H 00010 #define TEMPO_H 00011 00012 00020 //------------- // Classe Tempo 00021 class Tempo 00022 { 00023 // tempi dati in nanosecondi... 00024 double Tblgt,Tnow,Tmed,tdif,tlast,TotTime; 00025 int Nburst; 00026 public: 00027 int Icalls; 00028 Tempo(); 00029 ~Tempo(); 00030 void Set_Tburst(double tt) {Tblgt=tt;} 00031 void Set_Tempo( double tt) {Tnow=tt;} 00032 void Set_Tmed( double tt) { Tmed=tt;} 00033 double Get_Tempo(){return Tnow;} 00034 double Get_Tlast(){return tlast;} 00035 double Get_Tdif(){return tdif;} 00036 double Get_Tburst(){return Tblgt;} 00037 double Get_TTempo(){return TotTime;} 00038 void Reset_Tlast(){tlast=0.0;} 00039 double Get_ProdTempo(); 00040 void PrintTempo(); 00041 int Get_Nburst(){return Nburst;} 00042 00043 }; 00044 00045 #if defined(MAINFLYO) 00046 Tempo *TBurst; 00047 time_t tck,clockstart, clockend,clocklast; 00048 double Tpipe=1, Tdead=0.0; 00049 #endif 00050 00051 #if !defined(MAINFLYO) 00052 extern Tempo *TBurst; 00053 extern time_t tck,clockstart, clockend,clocklast; 00054 extern double Tpipe, Tdead; 00055 #endif 00056 #endif