Changeset 895 in Sophya for trunk/SophyaLib/SysTools/ctimer.h
- Timestamp:
- Apr 12, 2000, 7:49:54 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/SysTools/ctimer.h
r241 r895 1 1 // This may look like C code, but it is really -*- C++ -*- 2 2 // 3 // $Id: ctimer.h,v 1. 2 1999-04-21 13:12:00ansari Exp $3 // $Id: ctimer.h,v 1.3 2000-04-12 17:49:41 ansari Exp $ 4 4 // 5 5 … … 8 8 #define CTIMER_SEEN 9 9 10 #include "machdefs.h" 10 11 #include <sys/types.h> 11 12 #include <time.h> 12 13 #include <iostream.h> 13 14 #include <stdio.h> 14 #include "machdefs.h"15 #include <string> 15 16 16 17 // <summary> Permet de chronometrer des fonctions. </summary> … … 22 23 23 24 // La macro SPLITTIME lui permet d'afficher des temps partiels. 25 namespace SOPHYA { 26 27 //! Simple chronometer class 24 28 class Timer { 25 29 public: … … 35 39 36 40 // Sert a eviter que GNU ne pretende qu'on utilise pas l'objet... 41 /*! To avoid not used object compiler warnings */ 37 42 void Nop() {} 38 43 … … 40 45 clock_t cpu0, cpuSplit; 41 46 time_t elapse0, elapseSplit; 42 const char*timerName;47 string timerName; 43 48 }; 49 50 } // namespace SOPHYA 44 51 45 52 #define TIMEN(x) Timer timer(x); timer.Nop();
Note:
See TracChangeset
for help on using the changeset viewer.