MCPcopy Create free account
hub / github.com/TypesettingTools/Aegisub / GetAssFormatted

Method GetAssFormatted

libaegisub/ass/time.cpp:62–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60}
61
62std::string Time::GetAssFormatted(bool msPrecision) const {
63 int ass_time = msPrecision ? time : int(*this);
64 std::string ret(10 + msPrecision, ':');
65 ret[0] = '0' + ass_time / 3600000;
66 ret[2] = '0' + (ass_time % (60 * 60 * 1000)) / (60 * 1000 * 10);
67 ret[3] = '0' + (ass_time % (10 * 60 * 1000)) / (60 * 1000);
68 ret[5] = '0' + (ass_time % (60 * 1000)) / (1000 * 10);
69 ret[6] = '0' + (ass_time % (10 * 1000)) / 1000;
70 ret[7] = '.';
71 ret[8] = '0' + (ass_time % 1000) / 100;
72 ret[9] = '0' + (ass_time % 100) / 10;
73 if (msPrecision)
74 ret[10] = '0' + ass_time % 10;
75 return ret;
76}
77
78std::string Time::GetSrtFormatted() const {
79 std::string ret(12, ':');

Callers 15

WriteFileMethod · 0.80
ShowVideoDetailsDialogFunction · 0.80
read_subtitlesFunction · 0.80
UpdateTimeBoxesMethod · 0.80
WriteLineMethod · 0.80
SetTrackCursorMethod · 0.80
ValueMethod · 0.80
ValueMethod · 0.80
TimeEditMethod · 0.80
UpdateTextMethod · 0.80
OnCharMethod · 0.80
PasteTimeMethod · 0.80

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.64