File tree Expand file tree Collapse file tree 2 files changed +13
-13
lines changed
Expand file tree Collapse file tree 2 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,19 @@ void progress_display_t::print_summary() const
1414 m_rel.max , rels_time (now));
1515}
1616
17+ static double count_per_second (osmid_t count, uint64_t elapsed) noexcept
18+ {
19+ if (count == 0 ) {
20+ return 0.0 ;
21+ }
22+
23+ if (elapsed == 0 ) {
24+ return count;
25+ }
26+
27+ return static_cast <double >(count) / elapsed;
28+ }
29+
1730void progress_display_t::print_status (std::time_t now) const
1831{
1932 if (m_enabled) {
Original file line number Diff line number Diff line change @@ -76,19 +76,6 @@ class progress_display_t : public osmium::handler::Handler
7676 void possibly_print_status ();
7777 void print_status (std::time_t now) const ;
7878
79- static double count_per_second (osmid_t count, uint64_t elapsed) noexcept
80- {
81- if (count == 0 ) {
82- return 0.0 ;
83- }
84-
85- if (elapsed == 0 ) {
86- return count;
87- }
88-
89- return static_cast <double >(count) / elapsed;
90- }
91-
9279 uint64_t nodes_time (std::time_t now) const noexcept
9380 {
9481 if (m_node.count == 0 ) {
You can’t perform that action at this time.
0 commit comments