Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
How accurate are timers?
EvanReese
Member, Mentor Posts: 2,135 ✭✭✭✭✭
I was looking into using startTimer() and printTimer() in a feature, and realized I could call them in separate features, which could be a great way to profile my feature tree with more detail than the "Regeneration times" panel, since I could "start" and "check" my timers to evaluate sections of the tree. In some preliminary testing it seems like the values I'm getting from printTimer() are a lot different than the regen times though. Can someone explain why?
Evan Reese
0
Best Answer
-
ilya_baran Onshape Employees, Developers, HDM Posts: 1,211Yeah, startTimer and printTimer don't work when they're in different features because they're measuring wall clock time, and we don't always regenerate from the beginning. What happened was you edited some feature in the middle and we regenerated starting from that point some time later, and printTimer printed the time elapsed since the start of the previous regeneration. What are you trying to do?Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc0
Answers
One way you might be able to work around it is to force a full regeneration (make an empty sketch or some other feature and drag it up to the top of the feature tree).
IR for AS/NZS 1100