added sample statefulpolicyfunc to compile clock code