Forum Discussion
LanceSwigert
12 years agoCommunity Member
Timing how long an interaction takes.
So my courses have to be timed for credit. I have an interaction which include several slides and pathways. I want to be able to make sure that the participants spend a certain amount of time going ...
Bernovan-Soest
12 years agoCommunity Member
Lance,
Yes, you can copy and paste the JS code in triggers.
Regarding the calculations:
var player = GetPlayer();
var start = player.GetVar("gsStart");
var end = player.GetVar("gsEnd");
var duration = end - start;
You may want to divide by 1000 because the start and end time is in millisecond.
var duration = (end - start) / 1000;