MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / FormatVideoTimestamp

Function FormatVideoTimestamp

Telegram/SourceFiles/apiwrap.cpp:153–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151}
152
153[[nodiscard]] QString FormatVideoTimestamp(TimeId seconds) {
154 const auto minutes = seconds / 60;
155 const auto hours = minutes / 60;
156 return hours
157 ? u"%1h%2m%3s"_q.arg(hours).arg(minutes % 60).arg(seconds % 60)
158 : minutes
159 ? u"%1m%2s"_q.arg(minutes).arg(seconds % 60)
160 : QString::number(seconds);
161}
162
163} // namespace
164

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected