Added ability to check if on main thread, check to Time.