Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- generator:
- def threadCreate(i):
- id=0
- startTime = random.randint(i, i+20)
- while (id==0 or id in ids):
- id = random.randint(1, 20)
- working = random.randint(1,10)
- priority= random.randint(1,10)
- rasp = random.randint(0,1)
- thread =[startTime, id, working, priority, rasp]
- threads.append(thread)
- main:
- while (True):
- if(curTime==random.randint(curTime, curTime+25)):
- threadCreate(curTime)
- maxThread+=1
- multyCriteriaOutput(curTime)
- curTime+=1
- time.sleep(1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement