mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-09 21:50:45 +01:00
log time fix
This commit is contained in:
parent
e232257cb6
commit
0b50d4a328
@ -64,16 +64,20 @@ inline std::ostream& operator<< (std::ostream & stream, const GridMillisecs & no
|
|||||||
{
|
{
|
||||||
GridSecs second(1);
|
GridSecs second(1);
|
||||||
auto secs = now/second ;
|
auto secs = now/second ;
|
||||||
auto subseconds = now%second ;
|
auto subseconds = now%second ;
|
||||||
|
auto fill = stream.fill();
|
||||||
stream << secs<<"."<<std::setw(3)<<std::setfill('0')<<subseconds.count()<<" s";
|
stream << secs<<"."<<std::setw(3)<<std::setfill('0')<<subseconds.count()<<" s";
|
||||||
|
stream.fill(fill);
|
||||||
return stream;
|
return stream;
|
||||||
}
|
}
|
||||||
inline std::ostream& operator<< (std::ostream & stream, const GridUsecs & now)
|
inline std::ostream& operator<< (std::ostream & stream, const GridUsecs & now)
|
||||||
{
|
{
|
||||||
GridSecs second(1);
|
GridSecs second(1);
|
||||||
auto seconds = now/second ;
|
auto seconds = now/second ;
|
||||||
auto subseconds = now%second ;
|
auto subseconds = now%second ;
|
||||||
|
auto fill = stream.fill();
|
||||||
stream << seconds<<"."<<std::setw(6)<<std::setfill('0')<<subseconds.count()<<" s";
|
stream << seconds<<"."<<std::setw(6)<<std::setfill('0')<<subseconds.count()<<" s";
|
||||||
|
stream.fill(fill);
|
||||||
return stream;
|
return stream;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user