forked from ChunelFeng/CGraph
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMyNode2.py
More file actions
26 lines (21 loc) · 656 Bytes
/
MyNode2.py
File metadata and controls
26 lines (21 loc) · 656 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
"""
@Author: Chunel
@Contact: chunel@foxmail.com
@File: MyPyNode2
@Time: 2025/2/21 23:48
@Desc:
"""
from datetime import datetime
import time
from PyCGraph import GNode, CStatus
class MyNode2(GNode):
def init(self):
print("[INIT] [{0}], enter MyNode2 init function.".format(self.getName()))
return CStatus()
def run(self):
print("[{0}] {1}, enter MyNode2 run function. Sleep for 2 second ... ".format(datetime.now(), self.getName()))
time.sleep(2)
return CStatus()
def destroy(self):
print("[DESTROY] [{0}], enter MyNode2 destroy function.".format(self.getName()))
return CStatus()