ruby-01-basic.rb 170 Bytes
Newer Older
epsi sayidina's avatar
epsi sayidina committed
1 2 3 4 5 6 7 8 9 10 11
#!/usr/bin/ruby

timeformat = '%a %b %d %H:%M:%S'

while true do
    localtime = Time.now
    datestr = localtime.strftime(timeformat)
    puts datestr

    sleep(1)
end