Timeval: Restore output stream flags after changing them
Change-Id: I866505f29ed56d8f3ba3aaba70c0d82479987c64 Closes: CID#149361
This commit is contained in:
parent
6fa906c280
commit
2a3d8ba71a
|
@ -87,8 +87,9 @@ long Timeval::delta(const Timeval& other) const
|
|||
|
||||
ostream& operator<<(ostream& os, const Timeval& tv)
|
||||
{
|
||||
os.setf( ios::fixed, ios::floatfield );
|
||||
ios_base::fmtflags flags_backup = os.setf( ios::fixed, ios::floatfield );
|
||||
os << tv.seconds();
|
||||
os.flags( flags_backup );
|
||||
return os;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue