I\'ve got code that does time tracking for employees. It creates a counter to show the employee how long they have been clocked in for.
This is the current code:
why not use the built in "sec" . Here is an example :
t1 = Time.now.sec elapsed_t = Time.now.sec - t1 puts "it took me : #{elapsed_t} seconds to do something that is useful \n"