Skip to content

Instantly share code, notes, and snippets.

Created March 24, 2009 05:00
Show Gist options
  • Save anonymous/83950 to your computer and use it in GitHub Desktop.
Save anonymous/83950 to your computer and use it in GitHub Desktop.
def synchronize_with_server(records)
init_slim_timer
task = nil
records.each do |r|
task = @timer.create_task r.description, t.tags
speed_bump do
@timer.create_timeentry r.started_at, r.time_elapsed, task['id'], r.ended_at, r.tags
end
end
end
def speed_bump(&block)
sleep(1)
yield
sleep(1)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment