Update hive.py

Added a new function to do all the time checking and spawn the function with arg ( self ) .The newly created thread is appended to the thread list.