summaryrefslogtreecommitdiff
path: root/src/sub_time.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-01-28 22:41:09 +0000
committerCarl Hetherington <cth@carlh.net>2014-01-28 22:41:09 +0000
commit75aa6e480d998b29205c0eab328697a5d007986b (patch)
treeac53060d67ac2f6c64994e405220977c5ae5d817 /src/sub_time.cc
parent7f20aa518356f188946eb508239caf7c113da819 (diff)
Basic writer.
Diffstat (limited to 'src/sub_time.cc')
-rw-r--r--src/sub_time.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/sub_time.cc b/src/sub_time.cc
index 6de2456..a8e3a31 100644
--- a/src/sub_time.cc
+++ b/src/sub_time.cc
@@ -18,9 +18,11 @@
*/
#include "sub_time.h"
+#include "compose.hpp"
#include <iostream>
using std::ostream;
+using std::string;
using namespace sub;
bool
@@ -35,3 +37,9 @@ sub::operator<< (ostream& s, Time const & t)
s << t._hours << ":" << t._minutes << ":" << t._seconds << ":" << t._frames;
return s;
}
+
+string
+Time::timecode () const
+{
+ return String::compose ("%1:%2:%3:%4", _hours, _minutes, _seconds, _frames);
+}