Skip to content

Commit

Permalink
Merge pull request #913 from aschnell/master
Browse files Browse the repository at this point in the history
- coding style (sync with libstorage-ng)
  • Loading branch information
aschnell committed Jun 7, 2024
2 parents 5673ae2 + d3b568a commit f34323d
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions snapper/AppUtil.cc
Original file line number Diff line number Diff line change
Expand Up @@ -411,14 +411,14 @@ namespace snapper
}


StopWatch::StopWatch()
Stopwatch::Stopwatch()
: start_time(chrono::steady_clock::now())
{
}


double
StopWatch::read() const
Stopwatch::read() const
{
chrono::steady_clock::time_point stop_time = chrono::steady_clock::now();
chrono::steady_clock::duration duration = stop_time - start_time;
Expand All @@ -427,10 +427,10 @@ namespace snapper


std::ostream&
operator<<(std::ostream& s, const StopWatch& sw)
operator<<(std::ostream& s, const Stopwatch& stopwatch)
{
boost::io::ios_all_saver ias(s);
return s << fixed << sw.read() << "s";
return s << fixed << stopwatch.read() << "s";
}


Expand Down
6 changes: 3 additions & 3 deletions snapper/AppUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,15 @@ namespace snapper
vector<gid_t> getgrouplist(const char* username, gid_t gid);


class StopWatch
class Stopwatch
{
public:

StopWatch();
Stopwatch();

double read() const;

friend std::ostream& operator<<(std::ostream& s, const StopWatch& sw);
friend std::ostream& operator<<(std::ostream& s, const Stopwatch& sopwatch);

protected:

Expand Down
2 changes: 1 addition & 1 deletion snapper/Btrfs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1361,7 +1361,7 @@ namespace snapper

try
{
StopWatch stopwatch;
Stopwatch stopwatch;

const SDir subvolume(openSubvolumeDir());

Expand Down
2 changes: 1 addition & 1 deletion snapper/Compare.cc
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ namespace snapper

y2mil("dev1:" << cmp_data.dev1 << " dev2:" << cmp_data.dev2);

StopWatch stopwatch;
Stopwatch stopwatch;
cmpDirsWorker(cmp_data, dir1, dir2, "");
y2mil("stopwatch " << stopwatch << " for comparing directories");
}
Expand Down
2 changes: 1 addition & 1 deletion snapper/SystemCmd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ SystemCmd::~SystemCmd()
void
SystemCmd::execute()
{
StopWatch stopwatch;
Stopwatch stopwatch;

File_aC[IDX_STDERR] = File_aC[IDX_STDOUT] = NULL;
invalidate();
Expand Down
4 changes: 2 additions & 2 deletions testsuite-cmp/cmp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ cmp(const string& fstype, const string& subvolume, unsigned int num1, unsigned i
double t1;

{
StopWatch sw1;
Stopwatch sw1;

#if 1
cmpdirs_cb_t cb1 = helper(result1);
Expand All @@ -58,7 +58,7 @@ cmp(const string& fstype, const string& subvolume, unsigned int num1, unsigned i
double t2;

{
StopWatch sw2;
Stopwatch sw2;

#if 1
cmpdirs_cb_t cb2 = helper(result2);
Expand Down

0 comments on commit f34323d

Please sign in to comment.