summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorchatty1993-07-27 14:06:45 +0000
committerchatty1993-07-27 14:06:45 +0000
commit496edf245ef7be99fe03006b577f10b888ed8d39 (patch)
treefb0616ce055470c4365287060d296f94fa2a66c2 /utils
parent986e8b1a97717f9773f06263c698eec4ccedf6b0 (diff)
downloadivy-league-496edf245ef7be99fe03006b577f10b888ed8d39.zip
ivy-league-496edf245ef7be99fe03006b577f10b888ed8d39.tar.gz
ivy-league-496edf245ef7be99fe03006b577f10b888ed8d39.tar.bz2
ivy-league-496edf245ef7be99fe03006b577f10b888ed8d39.tar.xz
Added AsString
Diffstat (limited to 'utils')
-rw-r--r--utils/Time.cc7
-rw-r--r--utils/Time.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/utils/Time.cc b/utils/Time.cc
index 6780178..d51f65d 100644
--- a/utils/Time.cc
+++ b/utils/Time.cc
@@ -49,6 +49,13 @@ CcuTimeStamp :: operator Millisecond () const
}
#endif /* DOC */
+const char*
+CcuTimeStamp :: AsString () const
+{
+ time_t t = Value / 1000;
+ return ctime (&t);
+}
+
/*?class CcuTime
The class \typ{CcuTime} provides a simple way of manipulating real-time. Objects
of this class are used like integer variables whose value would change with time.
diff --git a/utils/Time.h b/utils/Time.h
index 998a23c..a7d2a1f 100644
--- a/utils/Time.h
+++ b/utils/Time.h
@@ -25,6 +25,7 @@ protected:
public:
CcuTimeStamp ();
inline operator Millisecond () const { return Value; }
+ const char* AsString () const;
};