diff options
Diffstat (limited to 'src/sub_time.cc')
| -rw-r--r-- | src/sub_time.cc | 8 |
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); +} |
