Task duration

Typically: "How do I... ", "How can I... " questions
Post Reply
nems
Posts: 6
Joined: 22 Aug 2017, 12:40

Task duration

Post by nems »

Hello,
I was wondering if there is a function in VREp to estimate the duration of a task performed by a serial robot.

Cheers

coppelia
Site Admin
Posts: 10339
Joined: 14 Dec 2012, 00:25

Re: Task duration

Post by coppelia »

Hello,

you can use following inside of a child script:

Code: Select all

startTime=sim.getSystemTimeInMs(-1)

-- do your calculations here

timeDiff=sim.getSystemTimeInMs(startTime)
print("Duration in seconds: "..timeDiff/1000)
Cheers

Post Reply