Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.wordie.framework;
- public class FMThread extends Thread{
- private Boolean paused_;
- private Boolean running_;
- private Boolean error_ = null;
- private Thread thread_;
- private String name_;
- public FMThread(Thread thread , String name){
- this.thread_ = thread;
- this.name_ = name;
- }
- public Boolean _start(){
- if(running_)
- return false;
- thread_.start();
- running_ = true;
- paused_ = false;
- return true;
- }
- public Boolean _sleep(long time){
- if(paused_)
- return false;
- if(time == 0)
- time = Integer.MAX_VALUE;
- try{ thread_.sleep(time);}
- catch(InterruptedException e){ return false; }
- paused_ = true;
- return true;
- }
- // TODO: some more methods
- public boolean _pause(){}
- public boolean _resume(){}
- public boolean _kill(){}
- public boolean _someOherShit(){}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement