You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/decorators.md
+35-2Lines changed: 35 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ void mytask() public;
40
40
41
41
# `this` keyword
42
42
43
-
- This keyword is used for modifying decorator argument values, without a specific order.
43
+
- This keyword is used for modifying decorator parameter values, without a specific order.
44
44
45
45
```cpp
46
46
@task;
@@ -61,4 +61,37 @@ void mytask() public;
61
61
{
62
62
console.println("Task works!");
63
63
}
64
-
```
64
+
```
65
+
66
+
## `@task` parameters
67
+
68
+
### `interval` (integer)
69
+
70
+
- How much does it take till the timer is (re)called.
71
+
72
+
```cpp
73
+
@task;
74
+
this->interval=1000;
75
+
voidmytask() public;
76
+
{
77
+
console.println("Task works!");
78
+
}
79
+
```
80
+
81
+
**NOTE**: This parameter's default value is 0, so it is obligatory to set it before creating the task unless you want to rape your logs.
82
+
83
+
### `repeat` (boolean)
84
+
85
+
- Will the timer recall after being called once?
86
+
87
+
```cpp
88
+
@task;
89
+
this->interval=1000;
90
+
this->repeat=false;
91
+
voidmytask() public;
92
+
{
93
+
console.println("Task works!");
94
+
}
95
+
```
96
+
97
+
**NOTE**: Now the timer will be called only once 1 second after `main` external-structured function gets called. Default value of this parameter is `true` so you don't need to set it unless you want to create a non-repeating timer.
0 commit comments