Rev 9:5

5 They were given power not to kill them, but to torment them for five months. Their torment was like the torment of a scorpion, when it strikes a man.

and was given (ἐδόθη) to them –  compare to Rev 13:5, “forty-two months was given (ἐδόθη) to him.” This 42 months was 1278 years, days as years.

for five months – every prophecy of Daniel has been proven as days equivalent to years, and there seems no reason for any exception in the Book of Revelation. Even, the three and a half days in Rev 11:9, can also be explained as 3 1/2 years. Therefore, we have every expectation that this prophecy takes place over a 150 year period.

like a scorpion when it stings a man – there is no greater torment than eternal spiritual torment.