You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: message.rs
    path of file: ./repos/orbtk/orbtk/examples
    
    the code of the file until where you have to start completion: use orbtk::prelude::*;

use std::{thread, time};

enum Message {
    Increment,
}

// constants
pub static ID_MESSAGE: &str = "message";
pub static ID_MESSAGE_STACK: &
    
    fn init(&mut self, _registry: &mut Registry, ctx: &mut Context) {
        let entity = ctx.widget().entity();
        let message_adapter = ctx.message_adapter();

        // increments a counter and send the result as message to `MainView`.
        self._my_thread = Some(thread::spawn(move || {
            let duration = time::Duration::from_secs(1);
            loop {
                thread::sleep(duration);
                message_adapter.send_message(Message::Increment, entity);
            }
        }));
    }