I used Clockwork TimeSpan.LapTime, but I want to know if there is another way because TimeSpan.LapTime causes an error and cannot be executed. There is no problem with python.
DynamoVersion 2.3.0
I used Clockwork TimeSpan.LapTime, but I want to know if there is another way because TimeSpan.LapTime causes an error and cannot be executed. There is no problem with python.
DynamoVersion 2.3.0
You could also do this way in python:
# Import Time
import time
# Start Run-time
start = time.time()
# Do Something
# Calculate Run-time
time = ("%s s" % (time.time()-start))
### Get run time ###
OUT = time
How do I fill out the form to connect a Dynamo node to a python node?
Because I’m learning Python so I’m a beginner…
By the way, the error is this.
Normally, it can be used without problems, but it is displayed when the node of TimeSpan.LapTime is placed and executed.
Starting with Dynamo 2.5 you can leverage the TuneUp view extension, which is quite handy for this. May be worth upgrading a detached version of your model and doing your time optimization there.
Is there a TuneUp alternative for Dynamo 2.3?
TimeSpan.LapTime etc. do not appear in my Clockwork for Dynamo.
Anything to do with this error?
Clockwork 2.3.0 is installed.
Try uninstalling bakery.
That was a rabbit hole of connected Packages. Never mind.
Python to return current time in Dynamo:
import time
dataEnteringNode = IN
myTime = time.strftime(’{%Y-%m-%d %H:%M:%S}’)
OUT = myTime
I tried that but result is always 0.0 s, why?
Likely because you aren’t doing anything in the # Do Something
section of the code, and as a result are just asking for the difference in time between now and now(so 0.0 seconds).
The TuneUp view extension is likely a better place to go now, as it will quarry the full run time for any node.