how to not Script a call to system.date.now()
Step-by-step guide
very simple Scripting
not so good Script
def test(time=system.date.now()):
print time
import time
for i in range (10):
test()
time.sleep(1)
returns
Thu Oct 08 09:23:13 PDT 2020
Thu Oct 08 09:23:13 PDT 2020
Thu Oct 08 09:23:13 PDT 2020
Thu Oct 08 09:23:13 PDT 2020
Thu Oct 08 09:23:13 PDT 2020
Thu Oct 08 09:23:13 PDT 2020
Thu Oct 08 09:23:13 PDT 2020
Thu Oct 08 09:23:13 PDT 2020
Thu Oct 08 09:23:13 PDT 2020
Thu Oct 08 09:23:13 PDT 2020
much better Script
def test(time=None):
if time is None:
time = system.date.now()
print time
import time
for i in range (10):
test()
time.sleep(1)
returns
Thu Oct 08 09:25:07 PDT 2020
Thu Oct 08 09:25:08 PDT 2020
Thu Oct 08 09:25:09 PDT 2020
Thu Oct 08 09:25:10 PDT 2020
Thu Oct 08 09:25:11 PDT 2020
Thu Oct 08 09:25:12 PDT 2020
Thu Oct 08 09:25:13 PDT 2020
Related articles
Formatting Time Values
Tracing a Trace Graph Time Out
MES Loggers and how to use them
-
Page:
-
Page:
-
Page:
-
Page:
-
Page: