how do i replace delay with millis in this code

Anvay:
'class ServoTimer2' has no member named 'writeMicroseconds'

If that's the case, or there's no equivalent, you'll have to produce random degrees then I suppose.