MCPcopy Create free account
hub / github.com/HowardHinnant/date / parse_unsigned_time

Function parse_unsigned_time

src/tz.cpp:906–927  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

904}
905
906static
907std::chrono::seconds
908parse_unsigned_time(std::istream& in)
909{
910 using namespace std::chrono;
911 int x;
912 in >> x;
913 auto r = seconds{hours{x}};
914 if (!in.eof() && in.peek() == ':')
915 {
916 in.get();
917 in >> x;
918 r += minutes{x};
919 if (!in.eof() && in.peek() == ':')
920 {
921 in.get();
922 in >> x;
923 r += seconds{x};
924 }
925 }
926 return r;
927}
928
929static
930std::chrono::seconds

Callers 1

parse_signed_timeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected