How can I keep my clock widget work in background?
My problem is solved. Following link helped me.

http://support.meetviva.com/knowledge_base/topics/huawei-how-to-disable-battery-optimisation-for-the-viva-app#

I opened Phone Manager, then Power saving, then Protected apps and then I turned on the apps which I do not want to close after turning off my screen.