Sha256: 4d54bf1a4bfd0502e3976bed84a3226079de1655131ae2192508504b98bc0152

Contents?: true

Size: 391 Bytes

Versions: 3

Compression:

Stored size: 391 Bytes

Contents

#!/usr/bin/env ruby

require 'neatjson'
require 'clock_window'
@hash = {}
begin
  loop do
    x = ClockWindow::ClockIt.new.active_window
    @hash[x] = @hash[x].to_f + 0.25
    sleep 15
  end
ensure
  @hash = {"*---------- WINDOW NAME ----------*" => "minutes"}.merge(@hash)
  File.open("timelog.json","w") do |f|
    f.write(JSON.neat_generate(@hash,aligned:true,around_colon:1))
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
clock_window-0.0.5 exe/clock_window
clock_window-0.0.4 exe/clock_window
clock_window-0.0.3 exe/clock_window