def do_the_stuff_to_the_thing():
    dt = now()
    next = dt + timedelta(minutes=1)
    # Wait until :15 to give Hbase some processing time.
    if dt.second < 15:
        log.info('Waiting until :15 past.')
        time.sleep(15 - dt.second)

    collect(dt)

    # Sleep until the next minute comes around.
    wait = next.replace(second=15) - now().replace(microsecond=0)
    # The delta will be around -1 days, 86400 seconds if we're into the next
    # minute already.
    if wait.seconds <= 60:
        log.info('Sleeping for %s seconds.' % wait.seconds)
        time.sleep(wait.seconds)
    else:
        log.info('Skipping sleep.')
dataset/ETHPy150Open jbalogh/glow/glow.py/do_the_stuff_to_the_thing/original