]> Dogcows Code - chaz/yoink/blobdiff - src/stlplus/portability/time.hpp
cleanup stlplus files
[chaz/yoink] / src / stlplus / portability / time.hpp
index f8abe6cfedd6c7e65f824423af943c9247c18370..d9907e63590b5c7d8cbec32ecb5861cc8445b37f 100644 (file)
@@ -1,55 +1,55 @@
-#ifndef STLPLUS_TIME\r
-#define STLPLUS_TIME\r
-////////////////////////////////////////////////////////////////////////////////\r
-\r
-//   Author:    Andy Rushton\r
-//   Copyright: (c) Southampton University 1999-2004\r
-//              (c) Andy Rushton           2004-2009\r
-//   License:   BSD License, see ../docs/license.html\r
-\r
-//   Simplified access to representations of time and conversions between them.\r
-//   The motivation for this package is that the low-level system calls for\r
-//   accessing time are ugly and therefore potentially error-prone. I hope that\r
-//   this interface is much simpler and therefore easier to use and more likely\r
-//   to yield first-time right programs.\r
-\r
-//   time is represented as the built-in integer type time_t - this is the\r
-//   standard representation of system time in computerland and represents the\r
-//   number of seconds since midnight 1 Jan 1970, believe it or not.\r
-\r
-//   Functions are provided here for converting to and from more\r
-//   human-comprehendable forms.\r
-\r
-////////////////////////////////////////////////////////////////////////////////\r
-#include "portability_fixes.hpp"\r
-#include <string>\r
-#include <time.h>\r
-\r
-namespace stlplus\r
-{\r
-\r
-  // get the integer representing the time now\r
-  time_t time_now(void);\r
-\r
-  // get the integer representing the requested time - the local time is expressed in the local timezone\r
-  time_t localtime_create(int year, int month, int day, int hour, int minute, int second);\r
-\r
-  // extract human-centric form of the machine representation time_t\r
-  int localtime_year(time_t);    // the year e.g. 1962\r
-  int localtime_month(time_t);   // the month, numbered 1-12 e.g. August = 8\r
-  int localtime_day(time_t);     // the day of the month numbered 1-31 e.g. 29\r
-  int localtime_hour(time_t);    // the hour of day numbered 0-23\r
-  int localtime_minute(time_t);  // minute past the hour numbered 0-59\r
-  int localtime_second(time_t);  // second past the minute numbered 0-59\r
-  int localtime_weekday(time_t); // the day of the week numbered 0-6 with 0=Sunday\r
-  int localtime_yearday(time_t); // the number of days into the year\r
-\r
-  // convert the integer representation of time to a human-readable form\r
-  std::string localtime_string(time_t);\r
-\r
-  // convert a time delay in seconds to human-readable form\r
-  std::string delaytime_string(time_t);\r
-\r
-} // end namespace stlplus\r
-\r
-#endif\r
+#ifndef STLPLUS_TIME
+#define STLPLUS_TIME
+////////////////////////////////////////////////////////////////////////////////
+
+//   Author:    Andy Rushton
+//   Copyright: (c) Southampton University 1999-2004
+//              (c) Andy Rushton           2004-2009
+//   License:   BSD License, see ../docs/license.html
+
+//   Simplified access to representations of time and conversions between them.
+//   The motivation for this package is that the low-level system calls for
+//   accessing time are ugly and therefore potentially error-prone. I hope that
+//   this interface is much simpler and therefore easier to use and more likely
+//   to yield first-time right programs.
+
+//   time is represented as the built-in integer type time_t - this is the
+//   standard representation of system time in computerland and represents the
+//   number of seconds since midnight 1 Jan 1970, believe it or not.
+
+//   Functions are provided here for converting to and from more
+//   human-comprehendable forms.
+
+////////////////////////////////////////////////////////////////////////////////
+#include "portability_fixes.hpp"
+#include <string>
+#include <time.h>
+
+namespace stlplus
+{
+
+  // get the integer representing the time now
+  time_t time_now(void);
+
+  // get the integer representing the requested time - the local time is expressed in the local timezone
+  time_t localtime_create(int year, int month, int day, int hour, int minute, int second);
+
+  // extract human-centric form of the machine representation time_t
+  int localtime_year(time_t);    // the year e.g. 1962
+  int localtime_month(time_t);   // the month, numbered 1-12 e.g. August = 8
+  int localtime_day(time_t);     // the day of the month numbered 1-31 e.g. 29
+  int localtime_hour(time_t);    // the hour of day numbered 0-23
+  int localtime_minute(time_t);  // minute past the hour numbered 0-59
+  int localtime_second(time_t);  // second past the minute numbered 0-59
+  int localtime_weekday(time_t); // the day of the week numbered 0-6 with 0=Sunday
+  int localtime_yearday(time_t); // the number of days into the year
+
+  // convert the integer representation of time to a human-readable form
+  std::string localtime_string(time_t);
+
+  // convert a time delay in seconds to human-readable form
+  std::string delaytime_string(time_t);
+
+} // end namespace stlplus
+
+#endif
This page took 0.021046 seconds and 4 git commands to generate.