Added variable time logic to thread
Merge branch 'master' into logic
Added comments