1
00:00:00,770 --> 00:00:01,880
Hello, welcome back.

2
00:00:02,120 --> 00:00:10,310
And this lesson we going to see how to use always delay to put our tasks and blocked states, always

3
00:00:10,310 --> 00:00:16,250
delay is the V task delay equivalent when using the census.

4
00:00:16,250 --> 00:00:19,820
Artus So I made a copy of our last project here.

5
00:00:19,820 --> 00:00:22,700
The last project was the Thread Terminate Project.

6
00:00:23,000 --> 00:00:24,110
I made a copy of it.

7
00:00:24,620 --> 00:00:27,920
This one is called Fortissimo Societies was delayed.

8
00:00:28,280 --> 00:00:30,530
So this is a not cleaned anything yet.

9
00:00:30,800 --> 00:00:37,670
The only thing I'm going to clean is the part where we, we terminates the task and resume it.

10
00:00:37,670 --> 00:00:43,070
So I'm going to delete these global variables here and then I'm going to go down here.

11
00:00:43,070 --> 00:00:45,620
This is where we make the determination.

12
00:00:47,130 --> 00:00:52,710
I'm going to delete this and I'm going to come down here this where we make the presumption going to

13
00:00:52,710 --> 00:00:53,800
delete this as well.

14
00:00:54,240 --> 00:00:57,180
So what we have now is just a simple.

15
00:00:58,070 --> 00:01:04,910
Our test project, we have four tasks, they all have the same priority, always priority, normal,

16
00:01:04,910 --> 00:01:07,550
priority, normal, normal, normal.

17
00:01:09,750 --> 00:01:13,470
And they are simply incrementing their respective.

18
00:01:15,360 --> 00:01:20,760
Um, profiler's, which is just a global variable, so what I'm going to do is I'm going to give them

19
00:01:20,760 --> 00:01:23,740
different priorities and let's see what we get.

20
00:01:24,180 --> 00:01:25,110
We know what we'd get.

21
00:01:25,350 --> 00:01:27,930
But for those of us who don't know, let's see what happens.

22
00:01:28,300 --> 00:01:30,710
I'm going to keep this one priority to be normal.

23
00:01:30,750 --> 00:01:36,990
This one's priority would be normal, one which is the same as normal priority, plus one, this one's

24
00:01:36,990 --> 00:01:38,490
priority will be no more two.

25
00:01:38,610 --> 00:01:40,110
And this one, no more three.

26
00:01:40,660 --> 00:01:43,500
OK, so yeah, we have.

27
00:01:44,970 --> 00:01:49,710
All of them with different priorities, let's build and see, click over here to build.

28
00:01:52,300 --> 00:01:55,730
OK, we have an anomaly somewhere.

29
00:01:56,410 --> 00:01:58,300
We still have part of the old code.

30
00:02:00,440 --> 00:02:05,580
Oh, we have this year of delay, this this red TASC execution counter.

31
00:02:05,660 --> 00:02:10,070
OK, so it's just a normal ARTUS project for tasks.

32
00:02:11,100 --> 00:02:12,360
With different priorities.

33
00:02:12,570 --> 00:02:13,500
That's all we have.

34
00:02:16,430 --> 00:02:20,990
OK, and then I'm going to debug it, but right clicking.

35
00:02:21,920 --> 00:02:27,560
And then debuggers ASTM 32 and a select number 40 over here.

36
00:02:30,080 --> 00:02:31,630
And I would say, OK.

37
00:02:35,340 --> 00:02:36,750
And then OK, over here.

38
00:02:42,190 --> 00:02:43,360
Then I click to switch.

39
00:02:46,820 --> 00:02:52,140
And then I'll pressure to run in, as we can see, we have just a blue task running.

40
00:02:52,520 --> 00:02:54,430
Why do we have the blue task running?

41
00:02:54,890 --> 00:03:03,110
Because when we check the priorities assignment blue task here has the highest priority, no more plus

42
00:03:03,110 --> 00:03:03,410
three.

43
00:03:03,860 --> 00:03:05,990
So that is why it is the only one running.

44
00:03:06,470 --> 00:03:10,670
OK, so we said we're going to use the always delay here.

45
00:03:11,000 --> 00:03:17,650
So I'm going to let each function call, call, always delay after it performs its increment.

46
00:03:17,660 --> 00:03:19,360
So we start from the first function.

47
00:03:19,790 --> 00:03:27,690
The first task function blue is going to always delay hundred red who do likewise orange as well.

48
00:03:27,740 --> 00:03:30,380
And finally, the green.

49
00:03:31,280 --> 00:03:32,900
OK, so click here to build.

50
00:03:36,310 --> 00:03:37,870
It's built successfully.

51
00:03:38,500 --> 00:03:39,970
Click here to go to the debugger.

52
00:03:45,220 --> 00:03:46,600
And then click here to switch.

53
00:03:52,140 --> 00:03:59,520
And click here to run now, as you can see, they're all running basically austerely, it's just like

54
00:03:59,520 --> 00:04:00,960
V task delay.

55
00:04:01,260 --> 00:04:02,070
It takes the.

56
00:04:03,480 --> 00:04:10,040
Did the task to the states, so that's all there is, this is very short, our Simms's artists project

57
00:04:10,050 --> 00:04:14,240
will be very, very short because we've already dealt with all of the components.

58
00:04:14,460 --> 00:04:18,470
We simply showing how to use them in some societies, that's all.

59
00:04:18,490 --> 00:04:19,470
So I'll see you later.

60
00:04:19,500 --> 00:04:20,300
Have a nice day.
