How to convert a always block in to task

Thanks for reply Ben, i will apply it in code and let you know.
I am having task to convert module based to class based that’s why.