MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / ToString

Method ToString

TombEngine/Scripting/Internal/TEN/Types/Time/Time.cpp:165–175  ·  view source on GitHub ↗

Convert this Time object to a formatted string. @function tostring @tparam Time this Time object. @treturn string A string showing time in "HH:MM:SS.CC" format.

Source from the content-addressed store, hash-verified

163 // @tparam Time this Time object.
164 // @treturn string A string showing time in "HH:MM:SS.CC" format.
165 std::string Time::ToString() const
166 {
167 auto hmsc = GetHmsc();
168
169 auto stream = std::ostringstream();
170 stream << std::setw(2) << std::setfill('0') << hmsc.Hours << ":"
171 << std::setw(2) << std::setfill('0') << hmsc.Minutes << ":"
172 << std::setw(2) << std::setfill('0') << hmsc.Seconds << "."
173 << std::setw(2) << std::setfill('0') << hmsc.Centiseconds;
174 return stream.str();
175 }
176
177 Time& Time::operator ++()
178 {

Callers

nothing calls this directly

Calls 1

strMethod · 0.45

Tested by

no test coverage detected