Using time for spawn