import time

class StopWatch:
    def __init__(self):
        self.start=self.stop=time.time()
  
    def Sleep(self, x):
  	time.sleep(x)

    def Start(self):
  	self.start=time.time()
  
    def Stop(self):
  	self.stop=time.time()
  
    def readDays(self):
  	return int((self.stop-self.start)/(24*60*60))

    def readHours(self):
  	return int(((self.stop-self.start)/(60*60))%24)

    def readMinutes(self):
  	return int((self.stop-self.start)/(60) % 60)

    def readSeconds(self):
  	return int(((self.stop-self.start))%60)

    def readmSeconds(self):
  	return (self.stop-self.start)%1*1000
  
    def timeString(self):
  	res=''
  	
        if self.readDays()>0: res+=str(self.readDays())+" days "; 
        if self.readHours()>0: res+=str(self.readHours())+" hours "; 
        if self.readMinutes()>0: res+=str(self.readMinutes())+" minutes "; 
        if self.readSeconds()>0: res+=str(self.readSeconds())+" seconds "; 
  	res+=str(self.readmSeconds())+" mseconds "; 
  	
  	return res;


