Skip to content

Commit

Permalink
Remove unused helper
Browse files Browse the repository at this point in the history
  • Loading branch information
pawurb committed Oct 4, 2024
1 parent 3689a4a commit 5507ed6
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions lib/pg-locks-monitor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,6 @@ def self.configuration
def self.configure
yield(configuration)
end

class DurationHelper
require "date"

def self.parse_to_ms(duration_str)
time = DateTime.strptime(duration_str, "%H:%M:%S.%N")
hours = time.hour
minutes = time.minute
seconds = time.second
nanoseconds = time.second_fraction * (10 ** 9)

total_ms = (hours * 3600 * 1000) + (minutes * 60 * 1000) + (seconds * 1000) + (nanoseconds / 1_000_000).to_i

total_ms
end
end
end

require "pg_locks_monitor/default_notifier"
Expand Down

0 comments on commit 5507ed6

Please sign in to comment.