client_api: make a member const
lua: add a timer API