The presiding judge, in his discretion under the law, may order any funds, in the hands of a receiver or any other officer of court, while awaiting the termination of protracted litigation, to be invested as provided in the case of executors and administrators.