The judge presiding at any criminal proceeding may allow any witness attending and testifying at the instance of the state’s attorney or defendant in such proceeding such sum as may be reasonable compensation for the loss which such witness may sustain by such attendance not exceeding ten dollars ($10.00) per diem. (1967, ch. 306, § 1.)