Thread sleep mechanism implemented