this is the right way to create a thread
Thread timer = new Thread() {
@Override
public void run() {
try {
//try something here
} catch (InterruptedException e) {
e.printStackTrace();
}
};
timer.start();
to make your thread sleeps
timer.sleep(1000);