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 » 09 Apr 2018, 10:47

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: 6766
Joined: 14 Dec 2012, 00:25

Re: Task duration

Post by coppelia » 12 Apr 2018, 07:04

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