Ajout de l'ensemble du workspace.
[GPU.git] / WCudaMSE / API_CppTest / INC / cpptest-time.h
diff --git a/WCudaMSE/API_CppTest/INC/cpptest-time.h b/WCudaMSE/API_CppTest/INC/cpptest-time.h
new file mode 100755 (executable)
index 0000000..b7cd938
--- /dev/null
@@ -0,0 +1,66 @@
+// ---\r
+//\r
+// $Id: cpptest-time.h,v 1.3 2005/06/08 08:08:06 nilu Exp $\r
+//\r
+// CppTest - A C++ Unit Testing Framework\r
+// Copyright (c) 2003 Niklas Lundell\r
+//\r
+// ---\r
+//\r
+// This library is free software; you can redistribute it and/or\r
+// modify it under the terms of the GNU Lesser General Public\r
+// License as published by the Free Software Foundation; either\r
+// version 2 of the License, or (at your option) any later version.\r
+//\r
+// This library is distributed in the hope that it will be useful,\r
+// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+// Lesser General Public License for more details.\r
+//\r
+// You should have received a copy of the GNU Lesser General Public\r
+// License along with this library; if not, write to the\r
+// Free Software Foundation, Inc., 59 Temple Place - Suite 330,\r
+// Boston, MA 02111-1307, USA.\r
+//\r
+// ---\r
+\r
+/** \file */\r
+\r
+#ifndef CPPTEST_TIME_H\r
+#define CPPTEST_TIME_H\r
+\r
+#include <iostream>\r
+#include <string>\r
+\r
+namespace Test\r
+{\r
+       /// \brief %Time representation.\r
+       ///\r
+       /// Encapsulates a time value with microsecond resolution. It is possible\r
+       /// to retrieve the current time, add and subtract time values, and output\r
+       /// the time to an output stream.\r
+       ///\r
+       class Time\r
+       {\r
+       public:\r
+               Time();\r
+               Time(unsigned int sec, unsigned int usec);\r
+               \r
+               unsigned int seconds() const;\r
+               unsigned int microseconds() const;\r
+               \r
+               static Time current();\r
+               \r
+               friend Time operator+(const Time& t1, const Time& t2);\r
+               friend Time operator-(const Time& t1, const Time& t2);\r
+               \r
+               friend std::ostream& operator<<(std::ostream& os, const Time& t);\r
+               \r
+       private:\r
+               unsigned int _sec;\r
+               unsigned int _usec;\r
+       };\r
+       \r
+} // namespace Test\r
+\r
+#endif // #ifndef CPPTEST_TIME_H\r