Fixing threading issue where it was possible for two devices to get the same work if they requested it at the same time.

Adding ntime updating.