Ajout de l'ensemble du workspace.
[GPU.git] / WCudaMSE / BilatTools_CPP / src / core / tools / header / Chronos.h
diff --git a/WCudaMSE/BilatTools_CPP/src/core/tools/header/Chronos.h b/WCudaMSE/BilatTools_CPP/src/core/tools/header/Chronos.h
new file mode 100755 (executable)
index 0000000..b740e9b
--- /dev/null
@@ -0,0 +1,60 @@
+#ifndef CHRONOS_H\r
+#define CHRONOS_H\r
+\r
+#include <string>\r
+\r
+using std::string;\r
+using std::ostream;\r
+\r
+class Chronos\r
+    {\r
+    public:\r
+\r
+       /*--------------------------------------*\\r
+        |*             Constructor             *|\r
+        \*-------------------------------------*/\r
+\r
+       Chronos();\r
+\r
+       /*--------------------------------------*\\r
+        |*             Destructor              *|\r
+        \*-------------------------------------*/\r
+\r
+       virtual ~Chronos();\r
+\r
+       /*--------------------------------------*\\r
+        |*             Methodes                *|\r
+        \*-------------------------------------*/\r
+\r
+       void start();\r
+       double stop();\r
+       double timeFlight() const;\r
+       double getDeltaTime() const;\r
+       void print(const string& titre = "") const;\r
+       void print(ostream& stream, const string& titre = "") const;\r
+\r
+       /*--------------------------------------*\\r
+        |*             Friend                  *|\r
+        \*-------------------------------------*/\r
+\r
+       friend ostream& operator <<(ostream& stream, const Chronos& chrono);\r
+\r
+    private:\r
+\r
+       /*--------------------------------------*\\r
+       |*              Methodes                *|\r
+        \*-------------------------------------*/\r
+\r
+       static double time();\r
+\r
+       /*--------------------------------------*\\r
+       |*              Attributs               *|\r
+        \*-------------------------------------*/\r
+\r
+       double timeStart;\r
+       double timeStop;\r
+       double deltaTime;\r
+       bool isRunning;\r
+    };\r
+\r
+#endif\r